The following sample illustrates the resource definition file (RC):

/*
 * Resouce module: WPSTYLER.RC
 */

#include <os2.h>
#include "wpstyler.rch"

ICON ID_OBJECTICON WPSTYLER.ICO

DLGTEMPLATE DLG_STYLE LOADONCALL MOVEABLE DISCARDABLE
BEGIN
    DIALOG  "", DLG_STYLE, 0, 0, 224, 200, NOT FS_DLGBORDER
    BEGIN
        /*
         * Create a read only MLE window on the page to hold the
         * object's title, similar to the General page title
         */
        LTEXT           "Title:",
                        -1, 10, 133,  24,  8
        MLE             "", DLG_OBJECTNAME,
                        30, 111, 110, 30,
                        MLS_WORDWRAP |
                        WS_GROUP |
                        MLS_IGNORETAB

        /*
         * Place all the Styler checkboxes nicely on the page
         */
        LTEXT           "Select or deselect the desired style flags",
                        -1, 10, 101, 169, 10
        AUTOCHECKBOX    "~Copy",     DLG_COPY,     10,  91,  80, 10
        AUTOCHECKBOX    "~Move",     DLG_MOVE,    106,  91,  80, 10
        AUTOCHECKBOX    "~Delete",   DLG_DELETE,   10,  77,  80, 10
        AUTOCHECKBOX    "~Rename",   DLG_RENAME,  106,  77,  80, 10
        AUTOCHECKBOX    "~Shadow",   DLG_SHADOW,   10,  63,  80, 10
        AUTOCHECKBOX    "~Print",    DLG_PRINT,   106,  63,  80, 10
        AUTOCHECKBOX    "~Template", DLG_TEMPLATE, 10,  49,  80, 10
        AUTOCHECKBOX    "Dr~op",     DLG_DROP,    106,  49,  80, 10

        /*
         * Frame the Drag checkbox and set the text color to red
         * to bring attention to it and to warn of its danger
         */
        CONTROL         "", -1, 8, 36, 146, 11,
                        WC_STATIC,
                        SS_HALFTONEFRAME |
                        WS_GROUP |
                        WS_VISIBLE
        AUTOCHECKBOX    "Drag (De-select with Caution)",
                        DLG_DRAG, 10, 37, 136, 9
                        PRESPARAMS PP_FOREGROUNDCOLOR, 0x00FF0000L

        /*
         * Add a status line just above the push buttons
         */
        LTEXT           "", DLG_STATUS,
                        7, 23, 191, 10, DT_VCENTER

        /*
         * Align the push buttons along the bottom
         */
        PUSHBUTTON      "~Apply",  DLG_APPLY,       7, 7, 38, 14
        PUSHBUTTON      "~Undo",   DLG_UNDO,       57, 7, 38, 14
        PUSHBUTTON      "Cancel",  DLG_CANCEL,    107, 7, 38, 14
        PUSHBUTTON      "~Help",   DLG_HELP,      157, 7, 38, 14
    END
END


[Back] [Next]