#include once "window9.bi"

Sub SetStateMenu(ByVal menu As HMENU, ByVal Npos As Integer, ByVal State As Integer)  Export
	If state=3 Or state=8 Then
		CheckMenuItem(menu,Npos,8)
	ElseIf state=1 then
		EnableMenuItem(menu,Npos,1)
	ElseIf state=2 then
		EnableMenuItem(menu,Npos,2)
	Else
		CheckMenuItem(menu,Npos,0)
		EnableMenuItem(menu,Npos,0)
	End If
End Sub
