#include once "window9.bi"

Function GetStateMenu Alias "GetStateMenu" (ByVal menu As HMENU,ByVal Npos As Integer) As Integer Export
  Var state=GetMenuState(menu,Npos,0)
  If state=3 Or state=8 Then
    Return 3
  ElseIf state=1 then
    Return 1
  ElseIf state=2 then
    Return 2
  ElseIf state=0 then
    Return 0
  Else
    Return -1
  End If
End Function
