MenuItem with Checked clause
Posted: Wed Feb 21, 2007 7:37 pm
Antonio,
Is this possible work with menu this type.
Thanks
Pawel
Is this possible work with menu this type.
Thanks
Pawel
www.FiveTechSoft.com
http://forums.fivetechsoft.com/
Code: Select all
HB_FUNC( ENABLEMENUITEM )
{
hb_retl( EnableMenuItem( ( HMENU ) hb_parnl( 1 ), hb_parnl( 2 ), hb_parnl( 3 ) ) );
}
#define MF_BYCOMMAND 0
#define MF_UNCHECKED 0
#define MF_CHECKED 8
DATA lChecked
METHOD SetCheck( lOnOff ) INLINE ;
::lChecked := lOnOff, CheckMenuItem( ::oMenu:hMenu,;
::nId, nOR( MF_BYCOMMAND, If( lOnOff, MF_CHECKED, MF_UNCHECKED ) ) )
REDEFINE MENUITEM oItem ID 110 OF oMenu ACTION ( MsgInfo( "Clientes" ), oItem:SetCheck( .t. ) )