It is currently Tue Jan 26, 2021 7:25 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: menuitem #WM_MOUSEHOVER #WM_MOUSELEAVE
PostPosted: Tue Aug 25, 2020 10:55 am 
Offline
Enthusiast
Enthusiast

Joined: Wed Mar 11, 2009 4:06 pm
Posts: 338
Location: NL
Any way to have 'on enter' and 'on leave' events when hovering over a menu item ('blue color') and getting the menuitem ID?
Can't find a way.


Top
 Profile  
Reply with quote  
 Post subject: Re: menuitem #WM_MOUSEHOVER #WM_MOUSELEAVE
PostPosted: Tue Aug 25, 2020 1:07 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed Mar 11, 2009 4:06 pm
Posts: 338
Location: NL
something like

Code:
Procedure WindowCallback(id, msg, wp, lp)
  Protected r = #PB_ProcessPureBasicEvents
  Protected menuID, menuIndex, menuFlags
  Select msg
    Case #WM_MENUSELECT
      menuID = lp
      menuIndex = LoWord(wp)
      menuFlags = HiWord(wp)
      If menuID = MenuID(Menu)
        Select menuIndex
          Case #MI_Test1 
            Debug "1"
          Case #MI_Test2
            Debug "2"
          Case #MI_Test3
            Debug "3"
        EndSelect
       
      EndIf
      If menuFlags & #MF_HILITE
        Debug "MF_HILITE"
      EndIf
      If menuFlags & #MF_DISABLED
        Debug "MF_DISABLED"
      EndIf
      If menuFlags & #MF_MOUSESELECT
        Debug "MF_MOUSESELECT"
      EndIf     
       
      Debug "#WM_MENUSELECT " + lp + ";" + menuIndex + "; " + menuFlags
  EndSelect
 
  ProcedureReturn r
EndProcedure

works


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye