Convert UNIT to char

Jul 13, 2011 at 11:50am
I need to convert the UNIT to LPCSTR in order to get it printed. Is it possible? If not, then what can i do in order to print the UNIT in a debugging message or message box

regards,
Jul 13, 2011 at 1:48pm
If I understood correctly, this has been answered multiple times. Google will give you the answer in the first couple of results. See http://www.cplusplus.com/forum/beginner/7777/ as an example of those results.
Jul 13, 2011 at 4:18pm
The confusion maybe coming from the type casting that Win32 likes to do. webJose is right, he just didn't mention that UNIT is an int and LPCSTR is a char* which are kind of important to remember when ever you're doing any kind of type casting.
Last edited on Jul 13, 2011 at 4:18pm
Jul 15, 2011 at 5:03am
LPCSTR is a const char*


fixed
Jul 17, 2011 at 8:53am
OK.. maybe I wan't clear in my question :)
sorry guys..
How could I print all the messages sent to windowProc() such as WM_CREATE, WM_CLOSE, ...
I know that those message values are pre-defined values, but I need to know which one is triggered on which action from which control.. please don't tell me to check msdn website for the list (for sure I did, but still no result)

thx :)
Jul 17, 2011 at 9:28am
Window messages are just numbers. Look in winuser.h header file to find their values.

If you want their string representation you better use Spy++.
Last edited on Jul 17, 2011 at 9:30am
Topic archived. No new replies allowed.