473,320 Members | 2,041 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

HWND to and from C# and Managed C++

How can I pass a C++ HWND to and from C# and Managed C++?
Mar 6 '07 #1
1 1383
In article <E1**********************************@microsoft.co m>,
Jo*****@discussions.microsoft.com says...
How can I pass a C++ HWND to and from C# and Managed C++?
Make sure you use an IntPtr and not an "integer".

--
Patrick Steele
http://weblogs.asp.net/psteele
Mar 7 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Juan Irigoyen | last post by:
I have the next code byte data = new byte; Marshal.Copy(this.Hwnd, data, 0, 4); this code compiled well, but when i execute the code receive a error. How can copy this.Hwnd (Handle of...
3
by: Andrew Moore | last post by:
Hi All, I have a managed C++ class that makes calls into the Win32 API. I specifically am trying to take a Handle from a .NET form and convert it to a HWND to pass to a Win32 functions. The...
17
by: Bonj | last post by:
Is PostQuitMessage(?) different to PostMessage(hWnd, WM_QUIT, ... ) ? I've got a window in a DLL (the same one experiencing the issue below, "return value of WM_QUIT") in which PostMessage(hWnd,...
4
by: quat | last post by:
Hello all, I have some unmanaged code that requires an HWND to a managed control (e.g., a picture box). I try: mRenderWnd->Handle; Of course, this returns an IntPtr. If I try to case, I...
1
by: Chris Ashley | last post by:
I am writing a Managed C++ wrapper for some unmanaged code to be used from C#. A lot of the C++ methods expect HWND parameters - what is the best way of passing these from C#? At the moment I am...
4
by: --== Alain ==-- | last post by:
Hi, When i debugged my code (see below) from my overrider WndProc method, i discovered that update has alway left, right, botton and top set to 0. therefore i wonder if my hwnd point to the...
15
by: =?Utf-8?B?Sm9hY2hpbQ==?= | last post by:
How can I pass a C++ HWND to and from C# and Managed C++?
11
by: =?ISO-8859-15?Q?Kolja_M=E4rtens?= | last post by:
Hello! I've been professionally working on java projects for several years, but have done extremely little C/C++ coding and just a few little things in VB.Net. Right now I'm trying to write a...
0
by: BarryM | last post by:
I was told that this piece coding to find the es_password state in c# would work but an error message saying hWnd does not exist in the current context internal static class UnsafeNativeMethods...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.