473,395 Members | 2,253 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,395 software developers and data experts.

Converting IntPtr to HWND

I need to convert an IntPtr (as returned from the Form,
get_Handle() method) to an HWND but can't find any
information as to how it is done. I've tried everything
I can think of and always seem to get an undefined value
for the pHandle.

HWND pHandle = (HWND)(void*)dataFormChild->get_Handle();

Thanks

Alison Kakoschke.

Nov 16 '05 #1
1 20034
HWND pHandle = (HWND)dataFormChild->get_Handle().ToPointer
();

steph
-----Original Message-----
I need to convert an IntPtr (as returned from the Form,
get_Handle() method) to an HWND but can't find any
information as to how it is done. I've tried everything
I can think of and always seem to get an undefined value
for the pHandle.

HWND pHandle = (HWND)(void*)dataFormChild->get_Handle();

Thanks

Alison Kakoschke.

.

Nov 16 '05 #2

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

Similar topics

13
by: Christian Westerlund | last post by:
Hi! I'm trying to use P/Invoke and a Method which takes an IntPtr where I am supposed to put an address to a method which the native method will use to communicate back to me. How do I convert a...
1
by: Edward Diener | last post by:
How do I convert a System::IntPtr returned by .net as a handle to an actual Win32 handle like an HWND ? Attempts to use static_cast<HWND>(anIntPtr) do not work.
4
by: Manuel Costa | last post by:
How the hell do i convert System::IntPtr to HDC? manuel
4
by: mabosch | last post by:
I'm trying to convert a DOC to JPG it works in Windows Forms, but I run under asp.net the clipboard its empty, I'm doing Dim objWord As New Word.Application Dim objDoc As Word.Document Const...
5
by: Rob Panosh | last post by:
Could somebody please assist me in converting the following C#.Net code to VB.Net code? private static extern short SQLAllocHandle(short hType, IntPtr inputHandle, out IntPtr outputHandle); ...
4
by: Brian Henry | last post by:
Hi, I am looking at the project at http://vbaccelerator.com/home/NET/Code/Libraries/Windows/MDI_Client_Area_Painting/article.asp and i'm trying to convert it to VB.net right now im in the...
9
by: Hugo Amselschlag | last post by:
Hi there, I've implemented a local system hook to suppress certain windows beeing displayed by the axWebbrowser control. Now I need some more information before I can decide, whether to suppress...
5
by: iwdu15 | last post by:
hi, i have this API call in VB6 Public Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long in...
6
by: NvrBst | last post by:
Hello. I can pInvoke "GetDC" with NULL or "IntPtr.Zero" and get the hDC for the entire screen. I can use the hDC for stuff like "GetPixel" and it works fine. When I try to do the... ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.