Ignore:
Timestamp:
Aug 19, 2002, 11:23:17 PM (23 years ago)
Author:
umoeller
Message:

Dialog formatter rewrite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/helpers/dialog.h

    r201 r209  
    4646    #define DLGERR_ROW_BEFORE_TABLE             (ERROR_DLG_FIRST)
    4747    #define DLGERR_CONTROL_BEFORE_ROW           (ERROR_DLG_FIRST + 1)
    48     #define DLGERR_NULL_CTL_DEF                 (ERROR_DLG_FIRST + 2)
     48    #define DLGERR_NULL_CONTROLDEF              (ERROR_DLG_FIRST + 2)
    4949    #define DLGERR_CANNOT_CREATE_FRAME          (ERROR_DLG_FIRST + 3)
    5050    #define DLGERR_INVALID_CODE                 (ERROR_DLG_FIRST + 4)
     
    5555    #define DLGERR_INVALID_CONTROL_TITLE        (ERROR_DLG_FIRST + 9)
    5656    #define DLGERR_INVALID_STATIC_BITMAP        (ERROR_DLG_FIRST + 10)
    57     #define DLGERR_INTEGRITY_BAD_COLUMN_INDEX   (ERROR_DLG_FIRST + 11)
    58 
    59     #define ERROR_DLG_LAST                      (ERROR_DLG_FIRST + 11)
     57    #define DLGERR_ROOT_TABLE_INHERIT_SIZE      (ERROR_DLG_FIRST + 11)
     58            // TABLE_INHERIT_SIZE set for root table, which is invalid
     59    #define DLGERR_GPIQUERYTEXTBOX              (ERROR_DLG_FIRST + 12)
     60            // GpiQueryTextBox failed
     61    #define DLGERR_GPIQUERYBITMAPINFOHEADER     (ERROR_DLG_FIRST + 13)
     62            // GpiQueryBitmapInfoHeader failed
     63
     64    #define ERROR_DLG_LAST                      (ERROR_DLG_FIRST + 12)
    6065
    6166    /* ******************************************************************
     
    6671
    6772    #define SZL_AUTOSIZE                (-1)
     73    #define SZL_REMAINDER               (0)
    6874
    6975    #define CTL_COMMON_FONT             ((PCSZ)-1)
     
    97103                                        // font specified on input to dlghCreateDlg
    98104
    99         USHORT      usAdjustPosition;
     105        // USHORT      usAdjustPosition;
    100106                // flags for winhAdjustControls; any combination of
    101107                // XAC_MOVEX, XAC_MOVEY, XAC_SIZEX, XAC_SIZEY
    102                 // @@todo not implemented yet
     108                // removed V0.9.21 (2002-08-18) [umoeller]
    103109
    104110        SIZEL       szlDlgUnits;
    105                 // proposed size for the control. Note that starting
    106                 // with V0.9.19, these are now dialog units to
    107                 // finally fix the bad alignment problems with
    108                 // lower resolutions. The dialog formatter applies
    109                 // an internal factor to these things based on
     111                // proposed size for the control content rectangle.
     112                // Starting with V0.9.19, this is specified in
     113                // dialog units to fix the bad alignment problems
     114                // with lower resolutions. The dialog formatter
     115                // applies an internal factor to these things based on
    110116                // what WinMapDlgPoints gives us.
     117                //
     118                // This size then becomes the column's content
     119                // rectangle, to which spacing is applied to get
     120                // the control's box.
     121                //
    111122                // A number of special flags are available per
    112123                // cx and cy field:
     124                //
    113125                // -- SZL_AUTOSIZE (-1): determine size automatically.
    114                 //    Works only for statics with SS_TEXT and
    115                 //    SS_BITMAP.
     126                //    The behavior of this is control-specific:
     127                //    -- Statics with SS_BITMAP or SS_ICON and
     128                //       single-line SS_TEXT statics may
     129                //       specify this for either cx or cy.
     130                //    -- Same applies to pushbuttons, checkboxes
     131                //       and radio buttons.
     132                //    -- Multi-line statics and XTextView controls
     133                //       can specify SZL_AUTOSIZE for cy only because
     134                //       we cannot determine the height without knowing
     135                //       the width.
     136                //
    116137                // -- Any other _negative_ value is considered a
    117138                //    percentage of the largest row width in the
     
    119140                //    the largest row in the table. This is valid
    120141                //    for the CX field only.
     142                //    For this, we take the _box_ of the widest
     143                //    row, subtract the left spacing of the first
     144                //    column in that row and the right spacing of
     145                //    the last column in that row (because this
     146                //    field specifies the content rectangle, but
     147                //    the row already had spacing applied).
     148                //
    121149                // If the CONTROLDEF appears with a START_NEW_TABLE
    122150                // type in _DLGHITEM (to specify a group table)
     
    177205                // TYPE_END_TABLE               // end of table
    178206
    179         const CONTROLDEF *pCtlDef;
     207        ULONG           ul1;        // const CONTROLDEF *pCtlDef;
    180208                // -- with TYPE_START_NEW_TABLE: if NULL, this starts
    181209                //          an invisible table (for formatting only).
     
    186214                //          the table.
    187215
    188         ULONG           fl;
     216        ULONG           ul2;
    189217                // -- with TYPE_START_NEW_TABLE. TABLE_* formatting flags.
    190218                        #define TABLE_ALIGN_COLUMNS         0x0100
     219                                // used with START_TABLE_ALIGN to align the table's
     220                                // columns horizontalle
     221                        #define TABLE_INHERIT_SIZE          0x0200
     222                                // if set, the table width is set to the
     223                                // widest row in the parent table. Useful
     224                                // for making several group boxes align
     225                                // vertically.
     226                                // @@todo get rid of this, remove size
     227                                // from CONTROLDEF, and make size a field
     228                                // of DLGHITEM so that we can finally treat
     229                                // tables like controls WRT size
    191230
    192231                // -- with TYPE_START_NEW_ROW: ROW_* formatting flags.
     
    202241    // a few handy macros for defining templates
    203242
    204     #define START_TABLE                     { TYPE_START_NEW_TABLE, NULL, 0 }
    205 
    206     #define START_TABLE_ALIGN               { TYPE_START_NEW_TABLE, NULL, TABLE_ALIGN_COLUMNS }
    207                 // added V0.9.20 (2002-08-08) [umoeller]
    208 
    209     #define START_GROUP_TABLE(pDef)         { TYPE_START_NEW_TABLE, pDef, 0 }
    210 
    211     #define START_GROUP_TABLE_ALIGN(pDef)   { TYPE_START_NEW_TABLE, pDef, TABLE_ALIGN_COLUMNS }
    212                 // added V0.9.20 (2002-08-08) [umoeller]
    213 
    214     #define END_TABLE                       { TYPE_END_TABLE, NULL, 0 }
    215 
    216     #define START_ROW(fl)                   { TYPE_START_NEW_ROW, NULL, fl }
    217 
    218     #define CONTROL_DEF(pDef)               { TYPE_CONTROL_DEF, pDef, 0 }
     243    #define START_TABLE                     { TYPE_START_NEW_TABLE, (ULONG)NULL, 0 }
     244
     245    #define START_TABLE_EXT(fl)             { TYPE_START_NEW_TABLE, (ULONG)NULL, fl }
     246                // added V0.9.21 (2002-08-16) [umoeller]
     247
     248    #define START_TABLE_ALIGN START_TABLE_EXT(TABLE_ALIGN_COLUMNS)
     249
     250    #define START_GROUP_TABLE(pDef)         { TYPE_START_NEW_TABLE, (ULONG)pDef, 0 }
     251
     252    #define START_GROUP_TABLE_EXT(pDef, fl) { TYPE_START_NEW_TABLE, (ULONG)pDef, fl }
     253                // added V0.9.21 (2002-08-16) [umoeller]
     254
     255    #define START_GROUP_TABLE_ALIGN(pDef) START_GROUP_TABLE_EXT(pDef, TABLE_ALIGN_COLUMNS)
     256
     257    #define END_TABLE                       { TYPE_END_TABLE, (ULONG)NULL, 0 }
     258
     259    #define START_ROW(fl)                   { TYPE_START_NEW_ROW, (ULONG)NULL, fl }
     260
     261    #define CONTROL_DEF(pDef)               { TYPE_CONTROL_DEF, (ULONG)pDef, 0 }
    219262
    220263    /* ******************************************************************
     
    248291    #define DLG_OUTER_SPACING_Y             3
    249292
    250     #define COMMON_SPACING                  1
     293    #ifdef DEBUG_DIALOG_WINDOWS
     294        #define COMMON_SPACING              5
     295    #else
     296        #define COMMON_SPACING              1
     297    #endif
    251298
    252299    #define GROUP_INNER_SPACING_X           3
    253     #define GROUP_OUTER_SPACING_BOTTOM      1
    254300    #define GROUP_INNER_SPACING_BOTTOM      3
    255301    #define GROUP_INNER_SPACING_TOP         8
    256     #define GROUP_OUTER_SPACING_TOP         0
     302    #define GROUP_OUTER_SPACING_X           COMMON_SPACING
     303    #define GROUP_OUTER_SPACING_BOTTOM      COMMON_SPACING
     304    #define GROUP_OUTER_SPACING_TOP         COMMON_SPACING
    257305
    258306    #define STD_BUTTON_WIDTH                50
     
    274322    #define CONTROLDEF_GROUP(pcsz, id, cx, cy) { WC_STATIC, pcsz, \
    275323            WS_VISIBLE | SS_GROUPBOX | DT_MNEMONIC, \
    276             id, CTL_COMMON_FONT, 0, { cx, cy }, COMMON_SPACING }
     324            id, CTL_COMMON_FONT, { cx, cy }, 0 }
    277325
    278326    #define LOADDEF_GROUP(id, cx) CONTROLDEF_GROUP(LOAD_STRING, id, cx, SZL_AUTOSIZE)
     327
     328    #define CONTROLDEF_SPACING(cx, cy) { WC_STATIC, NULL, \
     329            SS_TEXT, \
     330            -1, CTL_COMMON_FONT,  {cx, cy}, COMMON_SPACING }
    279331
    280332    #define CONTROLDEF_TEXT(pcsz, id, cx, cy) { WC_STATIC, pcsz, \
    281333            WS_VISIBLE | SS_TEXT | DT_LEFT | DT_VCENTER | DT_MNEMONIC, \
    282             id, CTL_COMMON_FONT,  0, {cx, cy}, COMMON_SPACING }
     334            id, CTL_COMMON_FONT,  {cx, cy}, COMMON_SPACING }
    283335
    284336    #define LOADDEF_TEXT(id) CONTROLDEF_TEXT(LOAD_STRING, id, SZL_AUTOSIZE, SZL_AUTOSIZE)
     
    286338    #define CONTROLDEF_TEXT_CENTER(pcsz, id, cx, cy) { WC_STATIC, pcsz, \
    287339            WS_VISIBLE | SS_TEXT | DT_CENTER | DT_VCENTER | DT_MNEMONIC, \
    288             id, CTL_COMMON_FONT,  0, {cx, cy}, COMMON_SPACING }
     340            id, CTL_COMMON_FONT,  {cx, cy}, COMMON_SPACING }
    289341
    290342    #define CONTROLDEF_TEXT_RIGHT(pcsz, id, cx, cy) { WC_STATIC, pcsz, \
    291343            WS_VISIBLE | SS_TEXT | DT_RIGHT | DT_VCENTER | DT_MNEMONIC, \
    292             id, CTL_COMMON_FONT,  0, {cx, cy}, COMMON_SPACING }
     344            id, CTL_COMMON_FONT,  {cx, cy}, COMMON_SPACING }
    293345
    294346    #define LOADDEF_TEXT_RIGHT(id) CONTROLDEF_TEXT_RIGHT(LOAD_STRING, id, SZL_AUTOSIZE, SZL_AUTOSIZE)
     
    296348    #define CONTROLDEF_TEXT_WORDBREAK(pcsz, id, cx) { WC_STATIC, pcsz, \
    297349            WS_VISIBLE | SS_TEXT | DT_LEFT | DT_TOP | DT_WORDBREAK, \
    298             id, CTL_COMMON_FONT,  0, {cx, SZL_AUTOSIZE}, COMMON_SPACING }
     350            id, CTL_COMMON_FONT,  {cx, SZL_AUTOSIZE}, COMMON_SPACING }
    299351
    300352    #define CONTROLDEF_TEXT_WORDBREAK_CY(pcsz, id, cx, cy) { WC_STATIC, pcsz, \
    301353            WS_VISIBLE | SS_TEXT | DT_LEFT | DT_TOP | DT_WORDBREAK, \
    302             id, CTL_COMMON_FONT,  0, {cx, cy}, COMMON_SPACING }
     354            id, CTL_COMMON_FONT,  {cx, cy}, COMMON_SPACING }
    303355
    304356    #define LOADDEF_TEXT_WORDBREAK(id, cx) CONTROLDEF_TEXT_WORDBREAK(LOAD_STRING, id, cx)
     
    306358    #define CONTROLDEF_TEXT_WORDBREAK_MNEMONIC(pcsz, id, cx) { WC_STATIC, pcsz, \
    307359            WS_VISIBLE | SS_TEXT | DT_LEFT | DT_TOP | DT_WORDBREAK | DT_MNEMONIC, \
    308             id, CTL_COMMON_FONT,  0, {cx, SZL_AUTOSIZE}, COMMON_SPACING }
     360            id, CTL_COMMON_FONT,  {cx, SZL_AUTOSIZE}, COMMON_SPACING }
    309361
    310362    #define LOADDEF_TEXT_WORDBREAK_MNEMONIC(id, cx) CONTROLDEF_TEXT_WORDBREAK_MNEMONIC(LOAD_STRING, id, cx)
     
    312364    #define CONTROLDEF_ICON(hptr, id) { WC_STATIC, (PCSZ)(hptr), \
    313365            WS_VISIBLE | SS_ICON | DT_LEFT | DT_VCENTER, \
    314             id, CTL_COMMON_FONT, 0, {SZL_AUTOSIZE, SZL_AUTOSIZE}, COMMON_SPACING }
     366            id, CTL_COMMON_FONT, {SZL_AUTOSIZE, SZL_AUTOSIZE}, COMMON_SPACING }
    315367
    316368    #define CONTROLDEF_ICON_WIDER(hptr, id) { WC_STATIC, (PCSZ)(hptr), \
    317369            WS_VISIBLE | SS_ICON | DT_LEFT | DT_VCENTER, \
    318             id, CTL_COMMON_FONT, 0, {SZL_AUTOSIZE, SZL_AUTOSIZE}, 2 * COMMON_SPACING }
     370            id, CTL_COMMON_FONT, {SZL_AUTOSIZE, SZL_AUTOSIZE}, 2 * COMMON_SPACING }
    319371
    320372    #define CONTROLDEF_BITMAP(hbm, id) { WC_STATIC, (PCSZ)(hbm), \
    321373            WS_VISIBLE | SS_BITMAP | DT_LEFT | DT_VCENTER, \
    322             id, CTL_COMMON_FONT, 0, {SZL_AUTOSIZE, SZL_AUTOSIZE}, COMMON_SPACING }
     374            id, CTL_COMMON_FONT, {SZL_AUTOSIZE, SZL_AUTOSIZE}, COMMON_SPACING }
    323375
    324376    // the following require INCL_WINBUTTONS
     
    326378    #define CONTROLDEF_DEFPUSHBUTTON(pcsz, id, cx, cy) { WC_BUTTON, pcsz, \
    327379            WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON | BS_DEFAULT, \
    328             id, CTL_COMMON_FONT, 0, {cx, cy}, COMMON_SPACING }
     380            id, CTL_COMMON_FONT, {cx, cy}, COMMON_SPACING }
    329381
    330382    #define LOADDEF_DEFPUSHBUTTON(id) CONTROLDEF_DEFPUSHBUTTON(LOAD_STRING, id, STD_BUTTON_WIDTH, STD_BUTTON_HEIGHT)
     
    332384    #define CONTROLDEF_PUSHBUTTON(pcsz, id, cx, cy) { WC_BUTTON, pcsz, \
    333385            WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, \
    334             id, CTL_COMMON_FONT, 0, {cx, cy}, COMMON_SPACING }
     386            id, CTL_COMMON_FONT, {cx, cy}, COMMON_SPACING }
    335387
    336388    #define LOADDEF_PUSHBUTTON(id) CONTROLDEF_PUSHBUTTON(LOAD_STRING, id, STD_BUTTON_WIDTH, STD_BUTTON_HEIGHT)
     
    338390    #define CONTROLDEF_DEFNOFOCUSBUTTON(pcsz, id, cx, cy) { WC_BUTTON, pcsz, \
    339391            WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON | BS_DEFAULT | BS_NOPOINTERFOCUS, \
    340             id, CTL_COMMON_FONT, 0, {cx, cy}, COMMON_SPACING }
     392            id, CTL_COMMON_FONT, {cx, cy}, COMMON_SPACING }
    341393
    342394    #define CONTROLDEF_NOFOCUSBUTTON(pcsz, id, cx, cy) { WC_BUTTON, pcsz, \
    343395            WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON | BS_NOPOINTERFOCUS, \
    344             id, CTL_COMMON_FONT, 0, {cx, cy}, COMMON_SPACING }
     396            id, CTL_COMMON_FONT, {cx, cy}, COMMON_SPACING }
    345397
    346398    #define LOADDEF_NOFOCUSBUTTON(id) CONTROLDEF_NOFOCUSBUTTON(LOAD_STRING, id, STD_BUTTON_WIDTH, STD_BUTTON_HEIGHT)
     
    348400    #define CONTROLDEF_HELPPUSHBUTTON(pcsz, id, cx, cy) { WC_BUTTON, pcsz, \
    349401            WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON | BS_HELP | BS_NOPOINTERFOCUS, \
    350             id, CTL_COMMON_FONT, 0, {cx, cy}, COMMON_SPACING }
     402            id, CTL_COMMON_FONT, {cx, cy}, COMMON_SPACING }
    351403
    352404    #define LOADDEF_HELPPUSHBUTTON(id) CONTROLDEF_HELPPUSHBUTTON(LOAD_STRING, id, STD_BUTTON_WIDTH, STD_BUTTON_HEIGHT)
     
    354406    #define CONTROLDEF_AUTOCHECKBOX(pcsz, id, cx, cy) { WC_BUTTON, pcsz, \
    355407            WS_VISIBLE | WS_TABSTOP | BS_AUTOCHECKBOX, \
    356             id, CTL_COMMON_FONT, 0, { cx, cy }, COMMON_SPACING }
     408            id, CTL_COMMON_FONT, { cx, cy }, COMMON_SPACING }
    357409
    358410    #define LOADDEF_AUTOCHECKBOX(id) CONTROLDEF_AUTOCHECKBOX(LOAD_STRING, id, SZL_AUTOSIZE, SZL_AUTOSIZE)
     
    360412    #define CONTROLDEF_FIRST_AUTORADIO(pcsz, id, cx, cy) { WC_BUTTON, pcsz, \
    361413            WS_VISIBLE | WS_TABSTOP | BS_AUTORADIOBUTTON | WS_GROUP, \
    362             id, CTL_COMMON_FONT, 0, { cx, cy }, COMMON_SPACING }
    363 
    364     #define LOADDEF_FIRST_AUTORADIO(id) CONTROLDEF_FIRST_AUTORADIO(LOAD_STRING, id, SZL_AUTOSIZE, SZL_AUTOSIZE)
     414            id, CTL_COMMON_FONT, { cx, cy }, COMMON_SPACING }
     415
     416    #define LOADDEF_FIRST_AUTORADIO(id) \
     417            CONTROLDEF_FIRST_AUTORADIO(LOAD_STRING, id, SZL_AUTOSIZE, SZL_AUTOSIZE)
    365418
    366419    #define CONTROLDEF_NEXT_AUTORADIO(pcsz, id, cx, cy) { WC_BUTTON, pcsz, \
    367420            WS_VISIBLE | WS_TABSTOP | BS_AUTORADIOBUTTON, \
    368             id, CTL_COMMON_FONT, 0, { cx, cy }, COMMON_SPACING }
     421            id, CTL_COMMON_FONT, { cx, cy }, COMMON_SPACING }
    369422
    370423    #define LOADDEF_NEXT_AUTORADIO(id) CONTROLDEF_NEXT_AUTORADIO(LOAD_STRING, id, SZL_AUTOSIZE, SZL_AUTOSIZE)
     
    374427    #define CONTROLDEF_ENTRYFIELD(pcsz, id, cx, cy) { WC_ENTRYFIELD, pcsz, \
    375428            WS_VISIBLE | WS_TABSTOP | ES_MARGIN | ES_AUTOSCROLL, \
    376             id, CTL_COMMON_FONT, 0, { cx, cy }, COMMON_SPACING }
     429            id, CTL_COMMON_FONT, { cx, cy }, COMMON_SPACING }
    377430
    378431    #define CONTROLDEF_ENTRYFIELD_RO(pcsz, id, cx, cy) { WC_ENTRYFIELD, pcsz, \
    379432            WS_VISIBLE | WS_TABSTOP | ES_MARGIN | ES_READONLY | ES_AUTOSCROLL, \
    380             id, CTL_COMMON_FONT, 0, { cx, cy }, COMMON_SPACING }
     433            id, CTL_COMMON_FONT, { cx, cy }, COMMON_SPACING }
    381434
    382435    // the following require INCL_WINMLE
     
    384437    #define CONTROLDEF_MLE(pcsz, id, cx, cy) { WC_MLE, pcsz, \
    385438            WS_VISIBLE | WS_TABSTOP | MLS_BORDER | MLS_IGNORETAB | MLS_WORDWRAP, \
    386             id, CTL_COMMON_FONT, 0, { cx, cy }, COMMON_SPACING }
     439            id, CTL_COMMON_FONT, { cx, cy }, COMMON_SPACING }
    387440
    388441    // the following require INCL_WINLISTBOXES
     
    390443    #define CONTROLDEF_LISTBOX(id, cx, cy) { WC_LISTBOX, NULL, \
    391444            WS_VISIBLE | WS_TABSTOP | LS_HORZSCROLL | LS_NOADJUSTPOS, \
    392             id, CTL_COMMON_FONT, 0, { cx, cy }, COMMON_SPACING }
     445            id, CTL_COMMON_FONT, { cx, cy }, COMMON_SPACING }
    393446
    394447    // the following require INCL_WINLISTBOXES and INCL_WINENTRYFIELDS
     
    396449    #define CONTROLDEF_DROPDOWN(id, cx, cy) { WC_COMBOBOX, NULL, \
    397450            WS_VISIBLE | WS_TABSTOP | LS_HORZSCROLL | CBS_DROPDOWN, \
    398             id, CTL_COMMON_FONT, 0, { cx, cy }, COMMON_SPACING }
     451            id, CTL_COMMON_FONT, { cx, cy }, COMMON_SPACING }
    399452
    400453    #define CONTROLDEF_DROPDOWNLIST(id, cx, cy) { WC_COMBOBOX, NULL, \
    401454            WS_VISIBLE | WS_TABSTOP | LS_HORZSCROLL | CBS_DROPDOWNLIST, \
    402             id, CTL_COMMON_FONT, 0, { cx, cy }, COMMON_SPACING }
     455            id, CTL_COMMON_FONT, { cx, cy }, COMMON_SPACING }
    403456
    404457    // the following require INCL_WINSTDSPIN
     
    406459    #define CONTROLDEF_SPINBUTTON(id, cx, cy) { WC_SPINBUTTON, NULL, \
    407460            WS_VISIBLE | WS_TABSTOP | SPBS_MASTER | SPBS_NUMERICONLY | SPBS_JUSTCENTER | SPBS_FASTSPIN, \
    408             id, CTL_COMMON_FONT, 0, {cx, cy}, COMMON_SPACING }
     461            id, CTL_COMMON_FONT, {cx, cy}, COMMON_SPACING }
    409462
    410463    // the following require INCL_WINSTDCNR
     
    412465    #define CONTROLDEF_CONTAINER(id, cx, cy) { WC_CONTAINER, NULL, \
    413466            WS_VISIBLE | WS_TABSTOP | 0, \
    414             id, CTL_COMMON_FONT, 0, {cx, cy}, COMMON_SPACING }
     467            id, CTL_COMMON_FONT, {cx, cy}, COMMON_SPACING }
    415468
    416469    #define CONTROLDEF_CONTAINER_EXTSEL(id, cx, cy) { WC_CONTAINER, NULL, \
    417470            WS_VISIBLE | WS_TABSTOP | CCS_EXTENDSEL, \
    418             id, CTL_COMMON_FONT, 0, {cx, cy}, COMMON_SPACING }
     471            id, CTL_COMMON_FONT, {cx, cy}, COMMON_SPACING }
    419472
    420473    // the following require INCL_WINSTDSLIDER
     
    423476            WS_VISIBLE | WS_TABSTOP | WS_GROUP | SLS_HORIZONTAL | SLS_PRIMARYSCALE1 \
    424477            | SLS_BUTTONSRIGHT | SLS_SNAPTOINCREMENT, \
    425             id, CTL_COMMON_FONT, 0, {cx, cy}, COMMON_SPACING, pctldata }
     478            id, CTL_COMMON_FONT, {cx, cy}, 0, pctldata }
     479            // id, CTL_COMMON_FONT, {cx, cy}, COMMON_SPACING, pctldata }
    426480
    427481    #define CONTROLDEF_VSLIDER(id, cx, cy, pctldata) { WC_SLIDER, NULL, \
    428482            WS_VISIBLE | WS_TABSTOP | WS_GROUP | SLS_VERTICAL | SLS_PRIMARYSCALE1 \
    429483            | SLS_BUTTONSRIGHT | SLS_SNAPTOINCREMENT, \
    430             id, CTL_COMMON_FONT, 0, {cx, cy}, COMMON_SPACING, pctldata }
     484            id, CTL_COMMON_FONT, {cx, cy}, COMMON_SPACING, pctldata }
     485
     486    // the following require #include helpers\comctl.h
     487    #define CONTROLDEF_SEPARATORLINE(id, cx, cy) { WC_SEPARATORLINE, NULL, \
     488            WS_VISIBLE, \
     489            id, NULL, {cx, cy}, COMMON_SPACING }
    431490
    432491    // the following require #include helpers\textview.h
     
    434493    #define CONTROLDEF_XTEXTVIEW(text, id, cx, pctldata) { WC_XTEXTVIEW, text, \
    435494            WS_VISIBLE | XS_STATIC | XS_WORDWRAP, \
    436             id, CTL_COMMON_FONT, 0, {cx, SZL_AUTOSIZE}, COMMON_SPACING, pctldata }
     495            id, CTL_COMMON_FONT, {cx, SZL_AUTOSIZE}, COMMON_SPACING, pctldata }
    437496
    438497    #define CONTROLDEF_XTEXTVIEW_HTML(text, id, cx, pctldata) { WC_XTEXTVIEW, text, \
    439498            WS_VISIBLE | XS_STATIC | XS_WORDWRAP | XS_HTML, \
    440             id, CTL_COMMON_FONT, 0, {cx, SZL_AUTOSIZE}, COMMON_SPACING, pctldata }
     499            id, CTL_COMMON_FONT, {cx, SZL_AUTOSIZE}, COMMON_SPACING, pctldata }
    441500
    442501    /* ******************************************************************
Note: See TracChangeset for help on using the changeset viewer.