PDA

Click to See Complete Forum and Search --> : how to get hWnd or hDc etc. of Window????


Zej
Aug 19th, 2000, 12:43 PM
In VB you would use :D

SetPixel Me.hdc, 5, 5, vbBlack


In C++ you would use???????:confused:

Aug 19th, 2000, 02:46 PM
I would also like to know this :)

Aug 19th, 2000, 07:45 PM
if your asking because that gave you an error, remember you need the Semi-Colon at the end of everline



int ProgramHwnd;
ProgramHwnd = CWnd.m_hWnd;

Aug 19th, 2000, 07:48 PM
Shouldn't it be:

HWND ProgramHwnd;

Aug 19th, 2000, 08:48 PM
oh yeah,
I am just starting C++ so i dont know all the data types yet.... thanks for correcting me :)

parksie
Aug 20th, 2000, 04:58 AM
Uh...Zej? Don't use CWnd.m_hWnd. You need to extract it from your CWnd-derived class...and as Megatron says, it's of type HWND.