PM Library | classes |
class PMMenu | ? ^ |
Menu class.
The PMMenu class creates a menu. A menu always is owned by another window, usually a frame window. When a user makes a choice from a menu, the menu posts a message WM_COMMAND with CMDSRC_MENU type containing the unique identifier for the menu item to its owner.
You can construct and destruct objects of this class.
- Source:
- pm_menu.h:27
- Author:
- Dmitry A.Steklenev
- Version:
- $Revision: 1.8 $
Contents | ^ |
Entity Inherited From Type Scope Short Description PMMenu constructor public Constructs the menu window from the dialog template. PMMenu constructor public Wraps the menu window object around an existing presentation window handle. ~PMMenu destructor public Destructs the menu window object. handle method public Returns the menu window handle. id method public Returns the menu identifier. count method public Returns the number of items in the menu. item_text method public Returns the text of the specified menu item. item_text_len method public Returns the length of the text of the specified menu item. item_text method public Sets the text into the specified menu item. font method public Sets a new font to be used by the window. check method public Sets the check state of the specified menu item. enable method public Sets the state of the specified menu item to the enable. disable method public Sets the state of the specified menu item to the disable. show method public Displays the pop-up menu. translate method public Translates the whole menu.
constructor PMMenu | ? ^ > |
Constructs the menu window from the dialog template.
- Source:
- pm_menu.h:42
- Params:
hparent Specifies the oiwner- and parent-window handle. res_id Dialog-template identity within the resource file. It is also used as the identity of the created menu. hmodule Module handle referencing a dynamic link library containing the resource or NULLHANDLE for the application's module.
- Code:
public PMMenu ( HWND hparent , SHORT res_id , HMODULE hmodule )
constructor PMMenu | ? ^ < > |
Wraps the menu window object around an existing presentation window handle.
- Source:
- pm_menu.h:49
- Code:
public PMMenu ( HWND handle )
destructor ~PMMenu | ? ^ < > |
Destructs the menu window object.
- Source:
- pm_menu.h:52
- Code:
public virtual ~ PMMenu ( )
method handle | ? ^ < > |
Returns the menu window handle.
- Source:
- pm_menu.h:55
- Code:
public HWND handle ( ) const
method id | ? ^ < > |
Returns the menu identifier.
- Source:
- pm_menu.h:57
- Code:
public SHORT id ( ) const
method count | ? ^ < > |
Returns the number of items in the menu.
- Source:
- pm_menu.h:60
- Code:
public virtual SHORT count ( ) const
method item_text | ? ^ < > |
Returns the text of the specified menu item.
- Source:
- pm_menu.h:62
- Code:
public virtual char * item_text ( SHORT item_id , char * result , short size ) const
method item_text_len | ? ^ < > |
Returns the length of the text of the specified menu item.
- Source:
- pm_menu.h:64
- Code:
public virtual int item_text_len ( SHORT item_id ) const
method item_text | ? ^ < > |
Sets the text into the specified menu item.
- Source:
- pm_menu.h:66
- Code:
public virtual void item_text ( SHORT item_id , const char * text )
method font | ? ^ < > |
Sets a new font to be used by the window.
- Source:
- pm_menu.h:69
- Code:
public virtual void font ( const char * font )
method check | ? ^ < > |
Sets the check state of the specified menu item.
- Source:
- pm_menu.h:78
- Params:
item_id Item identity. state Check flag.
- Code:
public virtual void check ( SHORT item_id , BOOL state )
method enable | ? ^ < > |
Sets the state of the specified menu item to the enable.
- Source:
- pm_menu.h:87
- Params:
item_id Item identity. state Enable flag.
- Code:
public virtual void enable ( SHORT item_id , BOOL state = TRUE )
method disable | ? ^ < > |
Sets the state of the specified menu item to the disable.
- Source:
- pm_menu.h:96
- Params:
item_id Item identity. state Enable flag.
- Code:
public virtual void disable ( SHORT item_id )
method show | ? ^ < > |
Displays the pop-up menu.
- Source:
- pm_menu.h:104
- Param:
item_id Item identity.
- Code:
public virtual void show ( SHORT item_id )
method translate | ? ^ < > |
Translates the whole menu.
Translates the menu text and all the submenu texts using for this purpose the current instance of the messages management object.
- Source:
- pm_menu.h:114
- Code:
public virtual void translate ( )
Created Fri Aug 3 09:13:16 2012.
This documentation was generated automatically by
ccdoc v08r39 2003/02/27 bin_opt_emx_os2-2.30.
Click here to submit a bug report or feature request for ccdoc.
Click here to return to the top of the page.