I'm having troubles trying to display the HWND of my window to an edit box. I'm thinking I should typecast it, but I don't know to what. It's in hex, right? Should I typecast it or what?
I'm having troubles trying to display the HWND of my window to an edit box. I'm thinking I should typecast it, but I don't know to what. It's in hex, right? Should I typecast it or what?
Environment: OS X, GCC / G++
Codes: Java, C#, C/C++
AOL IM: neandrake, Email: neandrake (at) gmail (dot) com
Try converting the hWnd to a string then display the string in the edit box.
HWND hWnd;
char Temp[20];
sprintf(Temp, "%x", hWnd);
>display Temp....
OR with leading 0's..... i.e 0009012E
sprintf(Temp, "%08x", hWnd);
Last edited by Scarlet7; 03-21-2003 at 05:27 PM.