rc.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CTLDATA (1.2)
                                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
 
                  The Resource Compiler CTLDATA Statement
 
CTLDATA word-value[, word-value][...]
 
CTLDATA string
 
CTLDATA MENU
BEGIN
menuitem-definition
   .
   .
   .
END
 
The CTLDATA statement defines control data for a custom dialog box, window,
or control. The statement has three basic forms to permit specifying a menu
or specifying data in words or characters. The data can be in any format,
since only your window procedure will use it. The window procedure of the
dialog box, window, or control receives this data when the item is created.
It is up to the window procedure to process the data.
 
Field                Description
────────────────────────────────────────────────────────────────────────────
 
 
word-value           Specifies a 16-bit value. This value must be an integer
                     in the range 0 through 65,535. It must be in decimal
                     notation.
 
string               Specifies a string of 8-bit characters. This field must
                     contain zero or more characters enclosed in double
                     quotation marks. Character values must be in the range
                     1 through 255. If a double quotation mark is required
                     in the string, you must include the double quotation
                     mark twice.
 
menuitem-definition  Specifies a MENUITEM or SUBMENU statement. These
                     statements define the individual commands or submenus
                     in the given menu. For details about these statements,
                     see the MENUITEM and SUBMENU topics.
 
Comments
 
CTLDATA is often used to supply data that controls the subsequent operation
of the custom window. For example, the CTLDATA statement may contain
extended style bits──that is, style bits designed specifically for your
customized window.
 
You should reserve the CTLDATA statement for window classes that you create
yourself.
 
Example
 
This example creates a menu for the window created with the WINDOW
statement.
 
WINDOWTEMPLATE 1
BEGIN
    WINDOW "Sample", 1, 0, 0, 100, 100, "MYCLASS", 0, FCF_STANDARD
    CTLDATA MENU
    BEGIN
        MENUITEM "Exit", 101
    END
END
 
See Also
 
CONTROL, DIALOG, FRAME, MENUITEM, PRESPARAMS, SUBMENU, WINDOW,
WINDOWTEMPLATE