Assembly code snippets

Back to the snippets overview

Details

TitleIsMenuItemChecked
AuthorQvasiModo
Submitted by:QvasiModo
Date added:2003-06-26 02:35:08
Date modified:2003-06-26 02:35:08

Comments

Returns TRUE (1) or FALSE (0)

Snippet

; IsMenuItemChecked
;    by QvasiModo

; Returns TRUE (1) or FALSE (0)

IsMenuItemChecked proto :dword,:dword

.code
IsMenuItemChecked proc imic_hmenu:dword,imic_id:dword
    invoke GetMenuState,imic_hmenu,imic_id,MF_BYCOMMAND
    shr eax,3
    and eax,TRUE
    ret
IsMenuItemChecked endp