windowswinapiencodingwindows-messages

Getting the numeric value of a given Windows message identifier


The WinAPI associates its messages, such as WM_GETTEXT, with ints, such as 13. Each message seems to have its own code.

Unfortunately, this list of codes is incomplete. For example, it lacks the code for the message CB_FINDSTRING.

Question: Given a Windows message, such as CB_FINDSTRING, how can I find its numerical code? The resources I've tried don't have all of them, and I've looked around a lot.


Solution

  • The free online site https://www.magnumdb.com (disclaimer: I wrote it) is a tool that will give you all values you want (it has around 400000 values/name pairs extracted from the whole Windows SDK and DDK, and also some Visual Studio headers), for example:

    https://www.magnumdb.com/search?q=CB_FINDSTRING

    enter image description here

    It also works the other way around: https://www.magnumdb.com/search?q=332

    It will give you the computed value (you can also see the input source) and is especially useful for people who are not using C/C++.