Changeset 159 for trunk/include/helpers/dialog.h
- Timestamp:
- Apr 25, 2002, 7:25:16 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/helpers/dialog.h
r157 r159 106 106 // @@todo not implemented yet 107 107 108 SIZEL szlControlProposed; 109 // proposed size; a number of special flags are 110 // available (per cx, cy field): 108 SIZEL szlDlgUnits; 109 // proposed size for the control. Note that starting 110 // with V0.9.19, these are now dialog units to 111 // finally fix the bad alignment problems with 112 // lower resolutions. The dialog formatter applies 113 // an internal factor to these things based on 114 // what WinMapDlgPoints gives us. 115 // A number of special flags are available per 116 // cx and cy field: 111 117 // -- SZL_AUTOSIZE (-1): determine size automatically. 112 118 // Works only for statics with SS_TEXT and … … 122 128 // size of the inner table of the group (to override 123 129 // the automatic formatting). Note that the dialog 124 // formatter adds COMMON_SPACING to both the left and 125 // the right of the table to center the table in the 126 // PM group control, so the actual group size will 127 // be the specified size + (2 * COMMON_SPACING). 128 129 ULONG ulSpacing; // spacing around control 130 // adds extra spacing to this size: 131 // -- the group control's cx will be 132 // 2 * szlControlProposed.cx 133 // + 2 * ulSpacing 134 // + 2 * GROUP_INNER_SPACING_X 135 // -- the group control's cy will be 136 // 2 * szlControlProposed.cy 137 // + 2 * ulSpacing 138 // + GROUP_INNER_SPACING_Y 139 // + GROUP_INNER_SPACING_TOP 140 141 ULONG duSpacing; 142 // spacing around control; this is now in dialog 143 // units too V0.9.19 (2002-04-24) [umoeller] 130 144 131 145 PVOID pvCtlData; // for WinCreateWindow … … 205 219 #define LOAD_STRING ((PCSZ)-1) 206 220 207 #define COMMON_SPACING 3 208 209 #define PM_GROUP_SPACING_X 16 210 #define PM_GROUP_SPACING_TOP 16 221 // if the following is defined, we ignore the Y factor 222 // when scaling dialog units to pixels but use the X 223 // factor twice. This will result in something specified 224 // to be 10x10 units to be square, but will result in 225 // problems because dialog units are based on the 226 // system default fonts and x is different from y then. 227 // #define USE_SQUARE_CORRELATION 228 229 // if you still want something to be vaguely square, 230 // try the following macro to calculate the CY from a CX 231 #ifdef USE_SQUARE_CORRELATION 232 #define MAKE_SQUARE_CY(cx) (cx) 233 #else 234 #define MAKE_SQUARE_CY(cx) (cx * 200 / 250) 235 #endif 236 237 #define DLG_OUTER_SPACING_X 4 238 // outer spacing applied around entire dialog; 239 // we now use 4 to match the spacing in Warp 4 240 // notebook pages V0.9.19 (2002-04-24) [umoeller] 241 #define DLG_OUTER_SPACING_Y 3 242 243 #define COMMON_SPACING 1 244 245 #define GROUP_INNER_SPACING_X 3 246 #define GROUP_OUTER_SPACING_BOTTOM 1 247 #define GROUP_INNER_SPACING_BOTTOM 3 248 #define GROUP_INNER_SPACING_TOP 8 249 #define GROUP_OUTER_SPACING_TOP 0 250 251 #define STD_BUTTON_WIDTH 50 252 253 #ifdef USE_SQUARE_CORRELATION 254 #define STD_BUTTON_HEIGHT 15 255 #define STD_SPIN_HEIGHT 10 256 #else 257 #define STD_BUTTON_HEIGHT 12 258 #define STD_SPIN_HEIGHT 8 259 #endif 260 261 #define DEFAULT_TABLE_WIDTH 150 211 262 212 263 // the following require INCL_WINSTATICS … … 214 265 #define CONTROLDEF_GROUP(pcsz, id, cx, cy) { WC_STATIC, pcsz, \ 215 266 WS_VISIBLE | SS_GROUPBOX | DT_MNEMONIC, \ 216 id, CTL_COMMON_FONT, 0, { cx, cy }, 0}217 218 #define CDEF_GROUP_AUTO(id) CONTROLDEF_GROUP(LOAD_STRING, id, -1, -1)267 id, CTL_COMMON_FONT, 0, { cx, cy }, COMMON_SPACING } 268 269 #define LOADDEF_GROUP(id, cx) CONTROLDEF_GROUP(LOAD_STRING, id, cx, SZL_AUTOSIZE) 219 270 220 271 #define CONTROLDEF_TEXT(pcsz, id, cx, cy) { WC_STATIC, pcsz, \ … … 222 273 id, CTL_COMMON_FONT, 0, {cx, cy}, COMMON_SPACING } 223 274 275 #define LOADDEF_TEXT(id) CONTROLDEF_TEXT(LOAD_STRING, id, SZL_AUTOSIZE, SZL_AUTOSIZE) 276 224 277 #define CONTROLDEF_TEXT_CENTER(pcsz, id, cx, cy) { WC_STATIC, pcsz, \ 225 278 WS_VISIBLE | SS_TEXT | DT_CENTER | DT_VCENTER | DT_MNEMONIC, \ … … 228 281 #define CONTROLDEF_TEXT_WORDBREAK(pcsz, id, cx) { WC_STATIC, pcsz, \ 229 282 WS_VISIBLE | SS_TEXT | DT_LEFT | DT_TOP | DT_WORDBREAK, \ 230 id, CTL_COMMON_FONT, 0, {cx, -1}, COMMON_SPACING }283 id, CTL_COMMON_FONT, 0, {cx, SZL_AUTOSIZE}, COMMON_SPACING } 231 284 232 285 #define CONTROLDEF_ICON(hptr, id) { WC_STATIC, (PCSZ)(hptr), \ 233 286 WS_VISIBLE | SS_ICON | DT_LEFT | DT_VCENTER, \ 234 id, CTL_COMMON_FONT, 0, { -1, -1}, COMMON_SPACING }287 id, CTL_COMMON_FONT, 0, {SZL_AUTOSIZE, SZL_AUTOSIZE}, COMMON_SPACING } 235 288 236 289 #define CONTROLDEF_BITMAP(hbm, id) { WC_STATIC, (PCSZ)(hbm), \ 237 290 WS_VISIBLE | SS_BITMAP | DT_LEFT | DT_VCENTER, \ 238 id, CTL_COMMON_FONT, 0, { -1, -1}, COMMON_SPACING }291 id, CTL_COMMON_FONT, 0, {SZL_AUTOSIZE, SZL_AUTOSIZE}, COMMON_SPACING } 239 292 240 293 // the following require INCL_WINBUTTONS … … 244 297 id, CTL_COMMON_FONT, 0, {cx, cy}, COMMON_SPACING } 245 298 299 #define LOADDEF_DEFPUSHBUTTON(id) CONTROLDEF_DEFPUSHBUTTON(LOAD_STRING, id, STD_BUTTON_WIDTH, STD_BUTTON_HEIGHT) 300 246 301 #define CONTROLDEF_PUSHBUTTON(pcsz, id, cx, cy) { WC_BUTTON, pcsz, \ 247 302 WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, \ 248 303 id, CTL_COMMON_FONT, 0, {cx, cy}, COMMON_SPACING } 249 304 305 #define LOADDEF_PUSHBUTTON(id) CONTROLDEF_PUSHBUTTON(LOAD_STRING, id, STD_BUTTON_WIDTH, STD_BUTTON_HEIGHT) 306 250 307 #define CONTROLDEF_DEFNOFOCUSBUTTON(pcsz, id, cx, cy) { WC_BUTTON, pcsz, \ 251 308 WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON | BS_DEFAULT | BS_NOPOINTERFOCUS, \ … … 257 314 258 315 #define CONTROLDEF_HELPPUSHBUTTON(pcsz, id, cx, cy) { WC_BUTTON, pcsz, \ 259 WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON | BS_HELP, \ 260 id, CTL_COMMON_FONT, 0, {cx, cy}, COMMON_SPACING } 316 WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON | BS_HELP | BS_NOPOINTERFOCUS, \ 317 id, CTL_COMMON_FONT, 0, {cx, cy}, COMMON_SPACING } 318 319 #define LOADDEF_HELPPUSHBUTTON(id) CONTROLDEF_HELPPUSHBUTTON(LOAD_STRING, id, STD_BUTTON_WIDTH, STD_BUTTON_HEIGHT) 261 320 262 321 #define CONTROLDEF_AUTOCHECKBOX(pcsz, id, cx, cy) { WC_BUTTON, pcsz, \ … … 264 323 id, CTL_COMMON_FONT, 0, { cx, cy }, COMMON_SPACING } 265 324 266 #define CDEF_AUTOCB_AUTO(id) CONTROLDEF_AUTOCHECKBOX(LOAD_STRING, id, -1, -1)325 #define LOADDEF_AUTOCHECKBOX(id) CONTROLDEF_AUTOCHECKBOX(LOAD_STRING, id, SZL_AUTOSIZE, SZL_AUTOSIZE) 267 326 268 327 #define CONTROLDEF_FIRST_AUTORADIO(pcsz, id, cx, cy) { WC_BUTTON, pcsz, \ … … 270 329 id, CTL_COMMON_FONT, 0, { cx, cy }, COMMON_SPACING } 271 330 331 #define LOADDEF_FIRST_AUTORADIO(id) CONTROLDEF_FIRST_AUTORADIO(LOAD_STRING, id, SZL_AUTOSIZE, SZL_AUTOSIZE) 332 272 333 #define CONTROLDEF_NEXT_AUTORADIO(pcsz, id, cx, cy) { WC_BUTTON, pcsz, \ 273 334 WS_VISIBLE | WS_TABSTOP | BS_AUTORADIOBUTTON, \ 274 335 id, CTL_COMMON_FONT, 0, { cx, cy }, COMMON_SPACING } 336 337 #define LOADDEF_NEXT_AUTORADIO(id) CONTROLDEF_NEXT_AUTORADIO(LOAD_STRING, id, SZL_AUTOSIZE, SZL_AUTOSIZE) 275 338 276 339 // the following require INCL_WINENTRYFIELDS … … 425 488 *pcszRetry, // "~Retry" 426 489 *pcszIgnore, // "~Ignore" 427 *pcszEnter, 428 *pcszYesToAll; // "Yes to ~all" 490 *pcszEnter, // "~Help" 491 *pcszYesToAll, // "Yes to ~all" 492 *pcszHelp; // "~Help" 429 493 } MSGBOXSTRINGS, *PMSGBOXSTRINGS; 430 494 … … 455 519 #define MBID_YES2ALL 10 456 520 521 typedef VOID APIENTRY FNHELP(HWND hwndDlg); 522 typedef FNHELP *PFNHELP; 523 457 524 APIRET dlghCreateMessageBox(HWND *phwndDlg, 458 525 HWND hwndOwner, … … 460 527 PCSZ pcszTitle, 461 528 PCSZ pcszMessage, 529 PFNHELP pfnHelp, 462 530 ULONG flFlags, 463 531 PCSZ pcszFont, … … 469 537 PCSZ pcszTitle, 470 538 PCSZ pcszMessage, 539 PFNHELP pfnHelp, 471 540 ULONG flFlags, 472 541 PCSZ pcszFont,
Note:
See TracChangeset
for help on using the changeset viewer.