Convert UNIT to char

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,
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.
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
LPCSTR is a const char*


fixed
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 :)
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
Topic archived. No new replies allowed.