Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>popup</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
POPUP
Create a popup menu
------------------------------------------------------------------------------

Syntax
#include "windows.ch"
#include "topclass.ch"   --or--   #define  NO_C4WCLASS
#include "commands.ch"
POPUP  [ <oPopup> | <hPopup>  TEXT ]  <cText>
     [ ID <cnId> ]
     [ IN [ MENU ]  <oMenu> | <hMenu> ]

Arguments
<oPopup> | <hPopup> is an optional variable to receive the
popup menu object (for an OO application) or handle (if
NO_C4WCLASS is defined).  Because this is rarely specified,
you need to also use the TEXT keyword if you use it.

<cText> is the title of the popup menu.  You can use an
ampersand ("&") to make the next character an accelerator
(keyboard short-cut), which will then be underlined when
displayed.

ID <cnId> is an optional ID for the popup.  You don't usually
specify this.

IN [ MENU ] <oMenu> | <hMenu>  specifies the parent (owner)
menu object or handle of the popup.

Description
This command can be used to create a menu in either a non-OO
application (by defining NO_C4WCLASS) or an OO application.  A
number of clauses may be ignored, to make it easier to convert
from non-OO to OO.

Example

MENU IN self
    POPUP "&File"
        MENUITEM "&Browse..."    COMMAND Browse      ;
            HELP WHelp{"Browse a file..."}
        MENUITEM SEPARATOR
        MENUITEM "E&xit"         COMMAND Exit        ;
            HELP WHelp{"Exit the application"}
    ENDPOPUP
    POPUP "&Help"
        MENUITEM "&About"        COMMAND HelpAbout   ;
            HELP WHelp{"About this application"}
    ENDPOPUP
ENDMENU


See Also: ENDMENU MENUITEM POPUP

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson