home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
3DTOSHI2.ZIP
/
mpgui
/
source
/
guimenu.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1996-04-17
|
1KB
|
55 lines
// guimenu.cpp
//
// Copyright (c) 1995 by Toshiaki Tsuji, all rights reserved.
#include "stdgfx.h"
#include "guimenu.h"
GUIMENU::GUIMENU () : GUIOBJECT ()
{
hMenu = NULL;
} // End of Constructor for GUIMENU
GUIMENU::~GUIMENU ()
{
#if defined (__FORWINDOWS__)
if (hMenu!=NULL)
DestroyMenu ( hMenu );
#endif
} // End of Destructor for GUIMENU
BOOLEAN GUIMENU::Load ( STRING Name )
{
#if defined (__FORWINDOWS__)
if (hMenu!=NULL)
DestroyMenu ( hMenu );
hMenu = LoadMenu ( hInstance, Name );
if (hMenu==NULL)
return FAILURE;
return SUCCESS;
#else
if (Name)
{}
return SUCCESS;
#endif
} // End of Load for GUIMENU
VOID GUIMENU::SetItemState ( LONG CommandID, LONG State )
{
if (CommandID&State)
{}
#if defined (__FORWINDOWS__)
#if defined (__FORWIN386__)
EnableMenuItem ( hMenu, (short)CommandID, (short)(State|MF_BYCOMMAND) );
#else
EnableMenuItem ( hMenu, CommandID, State | MF_BYCOMMAND );
#endif
#elif defined (__FOROS2__)
#elif defined (__FORDOS__)
#endif
} // End of SetItemState for GUIMENU