by Eric T (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 23rd October 2003
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
How to highlight owner-drawn menu items in XP, as ItemState = ODS_SELECTED is not available.
However, when the mouse moves over a menu item, the state changes to &H101 (257). Therefore you can check for item selection and highlight the entry accordingly or draw normally using:
if strOSName = "XP" then
if DrwaInfo.ItemState = 257 then
blnSelected = True
Else
blnSelected = False
End if
Else
blnSelected = True
End if
...
If DrawInfo.ItemState = ODS_SELECTED _
OR blnSelected then
HighlightTheMenuItem
Else
DrawMenuItemNormally
end if
Cheers, Eric T
No comments have been posted about How to highlight owner-drawn menu items in XP, as ItemState = ODS_SELECTED is not available.. Why not be the first to post a comment about How to highlight owner-drawn menu items in XP, as ItemState = ODS_SELECTED is not available..