2

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.

6
  • Why do you care? If you must have it for whatever reason, find it where the compiler finds it, in winUser.h. Commented Dec 4, 2020 at 6:04
  • @dxiv I'm using it with ctypes in Python, which prevents me from using the message identifier itself without some import-wrangling in a way that isn't clear to me. Using ints has worked fine for me, though, hence my question Commented Dec 4, 2020 at 6:07
  • 1
    Lookup pyWin32. Commented Dec 4, 2020 at 6:17
  • 1
    @dxiv This is perfect for my purposes. Thanks! Commented Dec 4, 2020 at 6:19
  • 1
    The free online site magnumdb.com (disclaimer: I wrote it) is a tool that will give you all values you want: magnumdb.com/search?q=CB_FINDSTRING (332) and also the other way around (magnumdb.com/search?q=332) it's especially useful for people who are not using C/C++. pywin32 has just a small extract of what exists in Windows. Commented Dec 4, 2020 at 7:28

1 Answer 1

4

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++.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.