Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to trigger OnSetCursor without actual mouse movement

Status
Not open for further replies.

NewPSC

Programmer
Dec 15, 2005
2
US
Hi! I wonder if somebody knows how to do this: What I am trying to do is control the shape of the mouse cursor, depending on the state of "engine" thread. We have OnSetCursor methods and all works well - as long as the mouse is physically moved! I would love to be able to post a message from the "engine" thread to the "display" thread to trigger the appropriate OnSetCursor method. There are multiple windows, so there are 8-10 different OnSetCursor methods. I tried a line like:

theApp.PostFEThreadMessage(WM_SETCURSOR, 0, 0);

I'm looking at a particular window (the one the mouse is actually on top of), but it is clear from SPY++ that the message I'm sending is not getting there. (Actual mouse moves DO show messages as expected.) BTW this "PostFEThreadMessage" method works fine for sending WM_USER messages.

I've looked around and I can find many mentions of "how to change the mouse cursor", but they all seem to rely either on mouse movement or making a permanent change for the window. Not quite what I'm looking for.

Am I on the right track? Thanks a bunch!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top