Jump to content
Sign in to follow this  

How to send WM_USER to a window

Recommended Posts


Using Winspector and clicking on a graphical button within an app I see the following commands (filtering out WM_MOUSEMOVE, WM_NCHITTEST, WM_SETCURSOR):






WM_USER + 9977 (0x00002af9)



From my reading, I understand that WM_USER is an internal message so am I correct in thinking sending that message to the window should click the button?

If so can someone please tell me how, or ideally, provide sample code that would do that?


Share this post

Link to post
Share on other sites

Seems like a dicey way to do it. For one thing if the developer adds some messages all the numbering may change. C guys have a tendency to do stuff like

#define MY_MSG (WM_USER + 1)

#define MY_NEW_MSG (MY_MSG + 1)


you see the peril. If the programmer sticks a new msg in the middle the numbering changes from that point on.

Why do you need to poke into a program private msg? If there is a button can't you just send it a click?

Edited by MilesAhead

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...