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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mousemove and find a button

Status
Not open for further replies.

simmeone

Programmer
Mar 16, 2000
29
DE
Hello.

I have build a Win32 API program, with a static and a button window. In WM_MOUSEMOVE I tray to find the to window and post a message when the mouse-cursor is over the static or button window.
With the static window it works very fine. The button window is ignored but when I make a static window than it works too. Why it it so ? What I have to do, that Windows find the button window too ?

A lot of thanks

Regards SiM
 
Your button is an other window. If you want your button to handle some many messages, try to subclass it. It means you should change its WndProc. John Fill
1c.bmp


ivfmd@mail.md
 
hmm ... I get another tip, that I should work with WM_NCHITTEST but I really don't know what I should do there ... When I work with WM_NCHITTEST suddenly nothing works correctly ...

Have anyone a idea ?

Regards SiM
 
No, if so, see WM_NOTIFY, but is not the best idea. Hittest is a message what you can send to see information on that coordinate for the window you are interested. The same message is sent by the system to know information about windows under mouse, before sending WM_*BUTTON*, WM_MOVE... In this case your application can respond explicitly or no to this message. John Fill
1c.bmp


ivfmd@mail.md
 
Hi ! I think you're right ... I will build my own class and try it ... thX a lot ...

Regards SiM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top