Hi all

In RadASM I have a fake menu on the dialogbox editor.
What I am trying to achive is hiliting the items on the menubar when the mouse is over an item. I thought if it is possible to capture the mouse to non client area my problems would be solved. Instead of trying to explain in words I post my test project.

KetilO
Posted on 2002-04-24 06:10:21 by KetilO
i tried it out and the main-menue items ARE highlighted...
besides that i think SetCapture is able to capture mouse-
input even when it is outside of your client area... if nothing
helps then look at this api, nan used for his custom control,
you can even create full custom caption bars and menues
with that cool api... without a non client area if i'm not
wrong here... DrawFrameControl was the name
Posted on 2002-04-24 06:19:20 by mob
Well, yes the items are hilited, but if you move the mouse fast enough they will still be hilited. Not a big problem tho.

KetilO
Posted on 2002-04-24 06:26:26 by KetilO
ah ok now i see... i had a similar problem in the past...
you can hook up WM_NCMOUSEMOVE like you already
do but if you use SetCapture you won't get a NCMOUSEMOVE
again if the cursor is outside you NC area... instead you'll
receive a plain WM_MOUSEMOVE msg... solution would be:


flag = false

- WM_NCMOUSEMOVE:

is mouse is over your menue-item?
(i would use PtInRect here, it's very small)
YES: flag = true
call SetCapture
NO: is flag = true?
YES: flag = false
call ReleaseCapture

- WM_MOUSEMOVE:

( is mouse is over your menue-item?
NO: ) is flag = true?
YES: flag = false
call ReleaseCapture

;maybe you can cut the 2nd mouseover
;check... just play around with it...

hope that helps... i had to do a similar thing (like i
said above) and it worked fine for me...
Posted on 2002-04-24 07:21:30 by mob
Thanks mob

I will try that.

KetilO
Posted on 2002-04-24 07:26:39 by KetilO