win32 api win procedure message tostring ?

Hello everybody,

I'm having a problem debugging my win32 app.
Somehow the winProc gets called over and over again with the message ids: 32, 160, 132

I have no idea where they are comming from. To be able to solve it i need to know what they is there some way to get the string representation of a windows message?

Kind Regards.


  • Just thought of something:

    Maybe I'm not consuming some event? Although I'm always returning 0
    which is like in the web examples..
  • [color=Blue]Check the .H files which came with your compiler - WM_xxx messages are in WINUSER.H. Some messages may be in other headers.

    Basically, Windows will decide which messages should come to your procedure. You can control it, but not completely. Just respond to messages in a proper Win32 manner.

    Returning 0 is OK for most of the messages, not sure of ALL messages. Some messages require definite return value, like WM_GETDLGCODE, as an example.

    132 = WM_NCHITTEST

    These ^^^ are normal messages for mouse moving over your window. And with WM_NCHITTEST you can do some cool stuff! Like force Windows to think that your window caption (a title bar) is in completely different place than usual.
  • Ok, this was very helpfull,
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!