source: trunk/src/kernel32/conprop.cpp@ 21

Last change on this file since 21 was 21, checked in by phaller, 26 years ago

Fixed a few more minor build glitches

File size: 71.6 KB
Line 
1/*
2 * Win32 Console API Translation for OS/2
3 *
4 * 1998/03/06 Patrick Haller (haller@zebra.fh-weingarten.de)
5 *
6 * @(#) conprop.cpp 1.0.0 1998/03/06 PH Start from scratch
7 */
8
9
10/*****************************************************************************
11 * Remark *
12 *****************************************************************************
13
14 - save / load properties from EAs
15
16 */
17
18
19/*****************************************************************************
20 * Includes *
21 *****************************************************************************/
22
23#define INCL_GPI
24#define INCL_WIN
25#define INCL_DOSMEMMGR
26#define INCL_DOSSEMAPHORES
27#define INCL_DOSERRORS
28#define INCL_DOSPROCESS
29#define INCL_DOSMODULEMGR
30#define INCL_VIO
31#define INCL_AVIO
32#include <os2.h>
33#include <builtin.h>
34
35#include <stdlib.h>
36#include <string.h>
37#include <stdarg.h>
38#include <stdio.h>
39
40#include <odin.h>
41#include "win32type.h"
42#include "misc.h"
43#include "console.h"
44#include "console2.h"
45#include "conprop.h"
46
47
48/*****************************************************************************
49 * Defines *
50 *****************************************************************************/
51
52
53
54#define HWNDERR( hwnd ) \
55 (ERRORIDERROR( WinGetLastError( WinQueryAnchorBlock( hwnd ) ) ))
56
57
58/*****************************************************************************
59 * Structures *
60 *****************************************************************************/
61
62typedef struct // VARIABLES USED FOR A NOTEBOOK PAGE
63{
64 ULONG ulID; // Resource ID for dialog page
65 PFNWP wpDlgProc; // dialog window procedure
66 PSZ szStatusLineText; // Text to go on status line
67 PSZ szTabText; // Text to go on major tab
68 ULONG idFocus; // ID of the control to get the focus first
69 BOOL fParent; // Is this a Parent page with minor pages
70 USHORT usTabType; // BKA_MAJOR or BKA_MINOR
71 USHORT fsPageStyles; // BKA_ styles for the page
72} NBPAGE, *PNBPAGE;
73
74#define TAB_WIDTH_MARGIN 10 // Padding for the width of a notebook tab
75#define TAB_HEIGHT_MARGIN 6 // Padding for the height of a notebook tab
76#define DEFAULT_NB_TAB_HEIGHT 16 // Default if Gpi calls fail
77
78#define PAGE_COUNT(a) (sizeof( a ) / sizeof( NBPAGE ))
79#define SPEAKERFREQ_LOW 200
80#define SPEAKERFREQ_HIGH 2000
81#define SPEAKERDUR_LOW 10
82#define SPEAKERDUR_HIGH 2000
83
84/**********************************************************************/
85/*----------------------- FUNCTION PROTOTYPES ------------------------*/
86/**********************************************************************/
87
88static VOID ErrorMsg( PSZ szFormat,
89 ... );
90
91
92static HWND NBCreateNotebook(HWND hwndClient,
93 ULONG id,
94 HMODULE hModule,
95 PNBPAGE pPage ,
96 ULONG ulPages,
97 PVOID pCreationParameters);
98
99static BOOL NBSetUpPage( HWND hwndClient,
100 HWND hwndNB,
101 HMODULE hModule,
102 PNBPAGE pPage,
103 PHWND phwnd,
104 PVOID pCreationParameters);
105
106static BOOL NBSetFramePos( HWND hwndFrame );
107
108static BOOL NBTurnToFirstPage( HWND hwndNB );
109
110static BOOL NBSetTabDimensions(HWND hwndNB);
111
112static VOID NBSetNBPage(HWND hwndClient,
113 HMODULE hModule,
114 PPAGESELECTNOTIFY ppsn,
115 PVOID pCreationParameters);
116
117static HWND NBCreateDialogPage(HWND hwndParent,
118 HWND hwndNB,
119 HMODULE hModule,
120 ULONG ulPageID,
121 ULONG idDlg,
122 FNWP fpDlg,
123 PVOID pCreationParameters);
124
125static MRESULT EXPENTRY wpDlgProcPage1(HWND hwnd,
126 ULONG ulMessage,
127 MPARAM mp1,
128 MPARAM mp2);
129
130static MRESULT EXPENTRY wpDlgProcPage2(HWND hwnd,
131 ULONG ulMessage,
132 MPARAM mp1,
133 MPARAM mp2);
134
135static MRESULT EXPENTRY wpDlgProcPage3(HWND hwnd,
136 ULONG ulMessage,
137 MPARAM mp1,
138 MPARAM mp2);
139
140static MRESULT EXPENTRY wpDlgProcPage4(HWND hwnd,
141 ULONG ulMessage,
142 MPARAM mp1,
143 MPARAM mp2);
144
145static MRESULT EXPENTRY wpDlgProcPage5(HWND hwnd,
146 ULONG ulMessage,
147 MPARAM mp1,
148 MPARAM mp2);
149
150static MRESULT EXPENTRY wpDlgProcPage6(HWND hwnd,
151 ULONG ulMessage,
152 MPARAM mp1,
153 MPARAM mp2);
154
155static INT WinGetStringSize(HPS hps,
156 PSZ szString );
157
158
159static APIRET ConPropPage1Set(HWND hwndDlg,
160 PCONSOLEOPTIONS pConsoleOptions);
161
162static APIRET ConPropPage2Set(HWND hwndDlg,
163 PCONSOLEOPTIONS pConsoleOptions);
164
165static APIRET ConPropPage3Set(HWND hwndDlg,
166 PCONSOLEOPTIONS pConsoleOptions);
167
168static APIRET ConPropPage4Set(HWND hwndDlg,
169 PCONSOLEOPTIONS pConsoleOptions);
170
171static APIRET ConPropPage5Set(HWND hwndDlg,
172 PCONSOLEOPTIONS pConsoleOptions);
173
174/****************************************************************************
175 * Module Global Variables *
176 ****************************************************************************/
177
178#define __PAGE__ 0, FALSE, BKA_MAJOR, BKA_AUTOPAGESIZE | BKA_STATUSTEXTON
179
180/* pfncreate, szStatusLineText, szTabText, idFocus, fParent, usTabType, fsPageStyles */
181static NBPAGE nbpage[] =
182{
183 {DLG_CONSOLE_PAGE1, wpDlgProcPage1, "General settings", "~Settings", __PAGE__ },
184 {DLG_CONSOLE_PAGE2, wpDlgProcPage2, "Speaker settings", "S~peaker", __PAGE__ },
185 {DLG_CONSOLE_PAGE3, wpDlgProcPage3, "Window position and size", "~Window", __PAGE__ },
186 {DLG_CONSOLE_PAGE4, wpDlgProcPage4, "Colors", "C~olors", __PAGE__ },
187 {DLG_CONSOLE_PAGE5, wpDlgProcPage5, "Priorities", "P~riority", __PAGE__ },
188 {DLG_CONSOLE_PAGE6, wpDlgProcPage6, "About ...", "~About", __PAGE__ }
189};
190
191static PSZ priorities[] = {"idle", "normal", "critical", "server"};
192#define NUMPRIORITIES 4
193
194/**********************************************************************/
195/*------------------------------- Msg --------------------------------*/
196/* */
197/* DISPLAY A MESSAGE TO THE USER. */
198/* */
199/* INPUT: a message in printf format with its parms */
200/* */
201/* 1. Format the message using vsprintf. */
202/* 2. Sound a warning sound. */
203/* 3. Display the message in a message box. */
204/* */
205/* OUTPUT: nothing */
206/* */
207/*--------------------------------------------------------------------*/
208/**********************************************************************/
209
210#define MESSAGE_SIZE 1024
211
212static VOID ErrorMsg( PSZ szFormat,
213 ... )
214{
215 PSZ szMsg;
216 va_list argptr;
217
218 if( (szMsg = (PSZ)malloc( MESSAGE_SIZE )) == NULL )
219 return;
220
221 va_start( argptr, szFormat );
222 vsprintf( szMsg, szFormat, argptr );
223 va_end( argptr );
224
225 szMsg[ MESSAGE_SIZE - 1 ] = 0;
226
227 (void) WinMessageBox( HWND_DESKTOP,
228 HWND_DESKTOP,
229 szMsg,
230 "Error ...",
231 1,
232 MB_OK | MB_MOVEABLE );
233 free( szMsg );
234 return;
235}
236
237
238/*****************************************************************************
239 * Name : static MRESULT ConsolePropertyDlgProc
240 * Purpose : window procedure for the console property dialog
241 * Parameters: HWND hwndDialog
242 * ULONG ulMessage
243 * MPARAM mp1
244 * MPARAM mp2
245 * Variables :
246 * Result :
247 * Remark :
248 * Status : UNTESTED
249 *
250 * Autor : Patrick Haller [Wed, 1998/02/16 11:46]
251 *****************************************************************************/
252
253MRESULT EXPENTRY ConsolePropertyDlgProc(HWND hwnd,
254 ULONG ulMessage,
255 MPARAM mp1,
256 MPARAM mp2)
257{
258 switch (ulMessage)
259 {
260 /*************************************************************************
261 * initialize the dialog *
262 *************************************************************************/
263 case WM_INITDLG:
264 {
265 PCONSOLEOPTIONS pConsoleOptions = (PCONSOLEOPTIONS)mp2; /* save ptr */
266 HWND hwndNotebook; /* notebook window handle */
267
268
269 /* @@@PH we should work on a copy of the console options for */
270 /* UNDO and APPLY to work properly */
271
272 WinSetWindowULong (hwnd, /* store the data pointer in local */
273 QWL_USER, /* variable storage attached to the*/
274 (ULONG)pConsoleOptions); /* window itself. */
275
276 hwndNotebook = NBCreateNotebook(hwnd, /* fill notebook with pages */
277 NB_CONSOLE_NOTEBOOK,
278 pConsoleOptions->hmodResources,
279 nbpage,
280 PAGE_COUNT(nbpage),
281 (PVOID)NULL);
282
283 /* this message makes the client pages to write new values into their */
284 /* controls. */
285 WinBroadcastMsg(hwnd, /* broadcast to all dialogs */
286 UM_PROPERTY_UNDO,
287 (MPARAM)pConsoleOptions,
288 (MPARAM)NULL,
289 BMSG_SEND |
290 BMSG_DESCENDANTS);
291
292 return ((MPARAM)FALSE);
293 }
294
295
296 /*************************************************************************
297 * control command messages *
298 *************************************************************************/
299
300 case WM_COMMAND:
301 {
302 PCONSOLEOPTIONS pConsoleOptions; /* the console options structure */
303
304 pConsoleOptions = (PCONSOLEOPTIONS)
305 WinQueryWindowULong(hwnd, /* query pointer from wnd */
306 QWL_USER);
307
308 switch (SHORT1FROMMP(mp1))
309 {
310 case ID_BTN_UNDO:
311 /* broadcast user message UM_PROPERTY_UNDO */
312 WinBroadcastMsg(hwnd, /* broadcast to all dialogs */
313 UM_PROPERTY_UNDO,
314 (MPARAM)pConsoleOptions,
315 (MPARAM)NULL,
316 BMSG_SEND |
317 BMSG_DESCENDANTS);
318 return ( (MPARAM) FALSE);
319
320 case ID_BTN_SAVE:
321 /* @@@PH save console option work buffer */
322 /* @@@PH ConsolePropertyWrite(pConsoleOptions) */
323 WinDismissDlg(hwnd,
324 ID_BTN_SAVE);
325 return ( (MPARAM) FALSE);
326
327 case ID_BTN_APPLY:
328 /* @@@PH save console option work buffer */
329 WinDismissDlg(hwnd,
330 ID_BTN_APPLY);
331 return ( (MPARAM) FALSE);
332
333 case BS_HELP:
334 return ( (MPARAM) FALSE);
335 }
336 }
337 }
338
339 return WinDefDlgProc(hwnd, /* default message processing */
340 ulMessage,
341 mp1,
342 mp2);
343}
344
345
346/*****************************************************************************
347 * Name :
348 * Purpose :
349 * Parameters:
350 * Variables :
351 * Result :
352 * Remark :
353 * Status : UNTESTED
354 *
355 * Autor : Patrick Haller [Wed, 1998/03/07 11:46]
356 *****************************************************************************/
357
358static HWND NBCreateNotebook(HWND hwndClient,
359 ULONG id,
360 HMODULE hModule,
361 PNBPAGE pPage ,
362 ULONG ulPages,
363 PVOID pCreationParameters)
364{
365 BOOL fSuccess = TRUE;
366 HWND hwndNB;
367 INT i;
368 PNBPAGE pP; /* Zeiger auf die Seiten des Notebookes */
369
370
371 if (pPage == NULL) /* Parameterberprfung */
372 return ( NULLHANDLE );
373
374 hwndNB = WinWindowFromID(hwndClient, /* get notebook window handle */
375 id);
376
377 if( hwndNB )
378 {
379 // Set the page background color to grey so it is the same as a dlg box.
380 if( !WinSendMsg(hwndNB,
381 BKM_SETNOTEBOOKCOLORS,
382 MPFROMLONG( SYSCLR_FIELDBACKGROUND ),
383 MPFROMSHORT( BKA_BACKGROUNDPAGECOLORINDEX ) ) )
384 ErrorMsg("BKM_SETNOTEBOOKCOLORS failed! RC(%X)",
385 HWNDERR( hwndClient ));
386
387 // Insert all the pages into the notebook and configure them. The dialog
388 // boxes are not going to be loaded and associated with those pages yet.
389
390 for(i = 0,
391 pP = pPage;
392
393 (i < ulPages) &&
394 (fSuccess == TRUE);
395
396 i++,
397 pP++ )
398
399 if (NBSetUpPage(hwndClient,
400 hwndNB,
401 hModule,
402 pP,
403 NULL,
404 pCreationParameters) == NULLHANDLE)
405 fSuccess = FALSE;
406 }
407 else
408 {
409 fSuccess = FALSE;
410 ErrorMsg("Notebook creation failed! RC(%X)",
411 HWNDERR( hwndClient ) );
412 }
413
414 if (fSuccess == TRUE) /* set notebook tab dimensions */
415 if( !NBSetTabDimensions(hwndNB))
416 fSuccess = FALSE;
417
418
419 if (fSuccess == TRUE) /* Haben wir Erfolg gehabt ? */
420 return (hwndNB); /* Ja */
421 else
422 return ( NULLHANDLE ); /* Nein */
423}
424
425
426
427/*****************************************************************************
428 *----------------------------- SetUpPage ----------------------------
429 *
430 * SET UP A NOTEBOOK PAGE.
431 *
432 * INPUT: window handle of notebook control,
433 * index into nbpage array
434 *
435 * 1.
436 *
437 * OUTPUT: TRUE or FALSE if successful or not
438 *
439 *****************************************************************************/
440
441static BOOL NBSetUpPage( HWND hwndClient,
442 HWND hwndNB,
443 HMODULE hModule,
444 PNBPAGE pPage,
445 PHWND phwnd,
446 PVOID pCreationParameters)
447{
448 ULONG ulPageId;
449 BOOL fSuccess = TRUE;
450 HWND hwndPage = NULLHANDLE;
451
452
453 if (pPage == NULL) /* Parameterberprfung */
454 return (hwndPage); /* failed !*/
455
456 /* Insert a page into the notebook and store it in the array of page data. */
457 /* Specify that it is to have status text and the window associated with */
458 /* each page will be automatically sized by the notebook according to the */
459 /* size of the page. */
460
461 ulPageId = (ULONG) WinSendMsg( hwndNB,
462 BKM_INSERTPAGE,
463 NULL,
464 MPFROM2SHORT( pPage->usTabType |
465 pPage->fsPageStyles,
466 BKA_LAST ) );
467
468 if( ulPageId )
469 {
470 /* Insert a pointer to this page's info into the space available */
471 /* in each page (its PAGE DATA that is available to the application).*/
472 fSuccess = (BOOL) WinSendMsg( hwndNB, BKM_SETPAGEDATA,
473 MPFROMLONG( ulPageId ),
474 MPFROMP( pPage ) );
475
476 /* Set the text into the status line. */
477 if( fSuccess )
478 {
479 if( pPage->fsPageStyles & BKA_STATUSTEXTON )
480 {
481 fSuccess = (BOOL) WinSendMsg( hwndNB, BKM_SETSTATUSLINETEXT,
482 MPFROMP( ulPageId ),
483 MPFROMP( pPage->szStatusLineText ) );
484 if( !fSuccess ) /* check errors */
485 ErrorMsg("BKM_SETSTATUSLINETEXT RC(%X)",
486 HWNDERR(hwndNB) );
487
488 }
489 }
490 else
491 ErrorMsg("BKM_SETPAGEDATA RC(%X)",
492 HWNDERR(hwndNB) );
493
494 // Set the text into the tab for this page.
495 if( fSuccess )
496 {
497 fSuccess = (BOOL) WinSendMsg(hwndNB,
498 BKM_SETTABTEXT,
499 MPFROMP(ulPageId),
500 MPFROMP(pPage->szTabText) );
501 if(!fSuccess) /* check errors */
502 ErrorMsg("BKM_SETTABTEXT RC(%X)",
503 HWNDERR( hwndNB ) );
504 }
505
506
507 // Create the dialog
508 if (fSuccess)
509 {
510 hwndPage = (HWND) WinSendMsg( hwndNB, BKM_QUERYPAGEWINDOWHWND,
511 MPFROMLONG( ulPageId ), NULL );
512 if( hwndPage == (HWND) BOOKERR_INVALID_PARAMETERS )
513 {
514 hwndPage = NULLHANDLE;
515 ErrorMsg( "NBSetUpPage BKM_QUERYPAGEWINDOWHWND Invalid page specified" );
516 }
517 else
518 if( !hwndPage )
519 {
520 /* load dialog from resource */
521 hwndPage = NBCreateDialogPage(hwndClient,
522 hwndNB,
523 hModule,
524 ulPageId,
525 pPage->ulID,
526 pPage->wpDlgProc,
527 pCreationParameters);
528 if (phwnd != NULL)
529 *phwnd = hwndPage; /* RckgabeHWND liefern */
530
531 if (hwndPage == NULLHANDLE)
532 {
533 fSuccess = FALSE;
534 ErrorMsg( "pPage-pfncreate failed. RC(%X)", HWNDERR( hwndNB ) );
535 }
536 }
537 }
538
539 }
540 else
541 ErrorMsg( "BKM_INSERTPAGE RC(%X)", HWNDERR( hwndNB ) );
542
543 return (fSuccess);
544}
545
546
547/**********************************************************************/
548/*---------------------------- SetFramePos ---------------------------*/
549/* */
550/* SET THE FRAME ORIGIN AND SIZE. */
551/* */
552/* INPUT: frame window handle */
553/* */
554/* 1. */
555/* */
556/* OUTPUT: TRUE or FALSE if successful or not */
557/* */
558/*--------------------------------------------------------------------*/
559/**********************************************************************/
560
561static BOOL NBSetFramePos( HWND hwndFrame )
562{
563 BOOL fSuccess;
564 POINTL aptl[ 2 ];
565
566 // Convert origin and size from dialog units to pixels. We need to do this
567 // because dialog boxes are automatically sized to the display. Since the
568 // notebook contains these dialogs it must size itself accordingly so the
569 // dialogs fit in the notebook.
570
571/* @@@PH ??? */
572#define FRAME_X 4 // In dialog units!
573#define FRAME_Y 4 // In dialog units!
574#define FRAME_CX 275 // In dialog units!
575#define FRAME_CY 210 // In dialog units!
576
577 aptl[ 0 ].x = FRAME_X;
578 aptl[ 0 ].y = FRAME_Y;
579 aptl[ 1 ].x = FRAME_CX;
580 aptl[ 1 ].y = FRAME_CY;
581
582 fSuccess = WinMapDlgPoints(HWND_DESKTOP,
583 aptl,
584 2,
585 TRUE );
586 if( fSuccess )
587 {
588 fSuccess = WinSetWindowPos(hwndFrame,
589 NULLHANDLE,
590 aptl[ 0 ].x,
591 aptl[ 0 ].y,
592 aptl[ 1 ].x,
593 aptl[ 1 ].y,
594 SWP_SIZE |
595 SWP_MOVE |
596 SWP_SHOW |
597 SWP_ACTIVATE );
598 if( !fSuccess )
599 ErrorMsg( "SetFramePos WinSetWindowPos RC(%X)",
600 HWNDERR( hwndFrame ) );
601 }
602 else
603 ErrorMsg( "WinMapDlgPoints RC(%X)",
604 HWNDERR( hwndFrame ) );
605
606 return fSuccess;
607}
608
609
610/**********************************************************************/
611/*------------------------- TurnToFirstPage --------------------------*/
612/* */
613/* TURN TO THE FIRST PAGE IN THE NOTEBOOK. */
614/* */
615/* INPUT: notebook window handle */
616/* */
617/* 1. */
618/* */
619/* OUTPUT: TRUE or FALSE if successful or not */
620/* */
621/*--------------------------------------------------------------------*/
622/**********************************************************************/
623
624static BOOL NBTurnToFirstPage( HWND hwndNB )
625{
626 ULONG ulFirstPage = 0;
627 BOOL fSuccess = TRUE;
628
629 ulFirstPage = (ULONG) WinSendMsg( hwndNB,
630 BKM_QUERYPAGEID,
631 NULL,
632 (MPARAM)BKA_FIRST );
633 if( ulFirstPage )
634 {
635 fSuccess = (ULONG) WinSendMsg(hwndNB,
636 BKM_TURNTOPAGE,
637 MPFROMLONG(ulFirstPage ),
638 NULL );
639 if( !fSuccess )
640 ErrorMsg( "TurnToFirstPage BKM_TURNTOPAGE RC(%X)", HWNDERR( hwndNB ) );
641
642 }
643 else
644 {
645 fSuccess = FALSE;
646 ErrorMsg( "TurnToFirstPage BKM_QUERYPAGEID RC(%X)", HWNDERR( hwndNB ) );
647 }
648
649 return fSuccess;
650}
651
652
653/**********************************************************************/
654/*-------------------------- SetTabDimensions ------------------------*/
655/* */
656/* SET THE DIMENSIONS OF THE NOTEBOOK TABS. */
657/* */
658/* INPUT: window handle of notebook control */
659/* */
660/* 1. */
661/* */
662/* OUTPUT: TRUE or FALSE if successful or not */
663/* */
664/*--------------------------------------------------------------------*/
665/**********************************************************************/
666
667static BOOL NBSetTabDimensions(HWND hwndNB)
668{
669 BOOL fSuccess = TRUE; /* success status of this function */
670 HPS hps = WinGetPS( hwndNB ); /* presentation space handle */
671 FONTMETRICS fm; /* data about current font */
672 INT iSize, /* width of tab text */
673 iLongestText = 0;
674 BOOKTEXT Booktext; /* booktext structure for tab text */
675 ULONG ulPageId; /* id of notebook page */
676
677 if( !hps )
678 {
679 ErrorMsg( "SetTabDimensions WinGetPS RC(%X)",
680 HWNDERR( hwndNB ) );
681 return FALSE;
682 }
683
684 (void) memset( &fm, 0, sizeof( FONTMETRICS ) );
685
686 // Calculate the height of a tab as the height of an average font character
687 // plus a margin value.
688
689 if( GpiQueryFontMetrics( hps, sizeof( FONTMETRICS ), &fm ) )
690 fm.lMaxBaselineExt += (TAB_HEIGHT_MARGIN * 2);
691 else
692 {
693 fm.lMaxBaselineExt = DEFAULT_NB_TAB_HEIGHT + (TAB_HEIGHT_MARGIN * 2);
694
695 ErrorMsg( "SetTabDimensions GpiQueryFontMetrics RC(%X)", HWNDERR( hwndNB ) );
696 }
697
698 // First setup the BOOKTEXT structure
699 Booktext.pString = (PSZ)malloc(256);
700 Booktext.textLen = 256;
701
702 // disable window update
703 WinEnableWindowUpdate (hwndNB,
704 FALSE);
705
706 // Calculate the longest tab text for both the MAJOR and MINOR pages
707 // this means to browse through all pages in the notebook and check
708 // out the largest tab text size.
709 ulPageId = (ULONG) WinSendMsg (hwndNB,
710 BKM_QUERYPAGEID,
711 NULL,
712 (MPARAM)BKA_FIRST);
713 while ( (ulPageId != NULLHANDLE) &&
714 (ulPageId != (ULONG)BOOKERR_INVALID_PARAMETERS) )
715 {
716 // query pointer to tab text data
717 WinSendMsg (hwndNB,
718 BKM_QUERYTABTEXT,
719 (MPARAM)ulPageId,
720 (MPARAM)&Booktext);
721
722 // determine largest tab text size
723 iSize = WinGetStringSize(hps,
724 Booktext.pString );
725 if( iSize > iLongestText )
726 iLongestText = iSize;
727
728 ulPageId = (ULONG) WinSendMsg (hwndNB, /* query the handle for the next */
729 BKM_QUERYPAGEID, /* notebook page */
730 MPFROMLONG( ulPageId ),
731 (MPARAM)BKA_NEXT);
732 }
733
734
735 free (Booktext.pString); /* free allocated resources */
736 WinReleasePS( hps );
737
738 // Add a margin amount to the longest tab text
739
740 if( iLongestText )
741 iLongestText += TAB_WIDTH_MARGIN;
742
743 // Set the tab dimensions for the MAJOR and MINOR pages. Note that the
744 // docs as of this writing say to use BKA_MAJOR and BKA_MINOR in mp2 but
745 // you really need BKA_MAJORTAB and BKA_MINORTAB.
746
747 if( iLongestText )
748 {
749 fSuccess = (BOOL) WinSendMsg(hwndNB,
750 BKM_SETDIMENSIONS,
751 MPFROM2SHORT(iLongestText,
752 (SHORT)fm.lMaxBaselineExt ),
753 MPFROMSHORT( BKA_MAJORTAB ) );
754 if( !fSuccess )
755 ErrorMsg("BKM_SETDIMENSIONS(MAJOR) RC(%X)",
756 HWNDERR( hwndNB ) );
757 }
758
759 // enable window update
760 WinEnableWindowUpdate (hwndNB,
761 TRUE);
762
763 return fSuccess;
764}
765
766
767/**********************************************************************/
768/*---------------------------- SetNBPage -----------------------------*/
769/* */
770/* SET THE TOP PAGE IN THE NOTEBOOK CONTROL. */
771/* */
772/* INPUT: client window handle, */
773/* pointer to the PAGESELECTNOTIFY struct */
774/* */
775/* 1. */
776/* */
777/* OUTPUT: nothing */
778/* */
779/*--------------------------------------------------------------------*/
780/**********************************************************************/
781
782static VOID NBSetNBPage(HWND hwndClient,
783 HMODULE hModule,
784 PPAGESELECTNOTIFY ppsn,
785 PVOID pCreationParameters)
786{
787 HWND hwndPage;
788
789 // Get a pointer to the page information that is associated with this page.
790 // It was stored in the page's PAGE DATA in the SetUpPage function.
791 PNBPAGE pnbp = (PNBPAGE) WinSendMsg(ppsn->hwndBook,
792 BKM_QUERYPAGEDATA,
793 MPFROMLONG(ppsn->ulPageIdNew ),
794 NULL );
795
796 if( !pnbp )
797 return;
798 else
799 if( (MRESULT)pnbp == (MRESULT)BOOKERR_INVALID_PARAMETERS )
800 {
801 ErrorMsg( "SetNBPage BKM_QUERYPAGEDATA Invalid page id" );
802 return;
803 }
804
805 // If this is a BKA_MAJOR page and it is what this app terms a 'parent'
806 // page, that means when the user selects this page we actually want to go
807 // to its first MINOR page. So in effect the MAJOR page is just a dummy page
808 // that has a tab that acts as a placeholder for its MINOR pages. If the
809 // user is using the left arrow to scroll thru the pages and they hit this
810 // dummy MAJOR page, that means they have already been to its MINOR pages in
811 // reverse order. They would now expect to see the page before the dummy
812 // MAJOR page, so we skip the dummy page. Otherwise the user is going the
813 // other way and wants to see the first MINOR page associated with this
814 // 'parent' page so we skip the dummy page and show its first MINOR page.
815
816 if( pnbp->fParent )
817 {
818 ULONG ulPageFwd, ulPageNew;
819
820 ulPageFwd = (ULONG) WinSendMsg(ppsn->hwndBook,
821 BKM_QUERYPAGEID,
822 MPFROMLONG( ppsn->ulPageIdNew ),
823 MPFROM2SHORT(BKA_NEXT,
824 BKA_MINOR ) );
825
826 // If this is true, the user is going in reverse order
827 if( ulPageFwd == ppsn->ulPageIdCur )
828 ulPageNew = (ULONG) WinSendMsg(ppsn->hwndBook,
829 BKM_QUERYPAGEID,
830 MPFROMLONG(ppsn->ulPageIdNew ),
831 MPFROM2SHORT(BKA_PREV,
832 BKA_MAJOR) );
833 else
834 ulPageNew = ulPageFwd;
835 if( ulPageNew == (ULONG) BOOKERR_INVALID_PARAMETERS )
836 ErrorMsg( "SetNBPage BKM_QUERYPAGEID Invalid page specified" );
837 else
838 if( ulPageNew )
839 if( !WinSendMsg(ppsn->hwndBook,
840 BKM_TURNTOPAGE,
841 MPFROMLONG( ulPageNew ),
842 NULL ) )
843 ErrorMsg("BKM_TURNTOPAGE RC(%X)",
844 HWNDERR( ppsn->hwndBook ) );
845 }
846 else
847 {
848 hwndPage = (HWND) WinSendMsg(ppsn->hwndBook,
849 BKM_QUERYPAGEWINDOWHWND,
850 MPFROMLONG(ppsn->ulPageIdNew ),
851 NULL );
852 if( hwndPage == (HWND) BOOKERR_INVALID_PARAMETERS )
853 {
854 hwndPage = NULLHANDLE;
855 ErrorMsg( "SetNBPage BKM_QUERYPAGEWINDOWHWND Invalid page specified" );
856 }
857 else
858 if( !hwndPage )
859
860 // It is time to load this dialog because the user has flipped pages
861 // to a page that hasn't yet had the dialog associated with it.
862 hwndPage = NBCreateDialogPage(hwndClient,
863 ppsn->hwndBook,
864 hModule,
865 ppsn->ulPageIdNew,
866 pnbp->ulID,
867 pnbp->wpDlgProc,
868 pCreationParameters);
869 }
870
871 // Set focus to the first control in the dialog. This is not automatically
872 // done by the notebook.
873 if( !pnbp->fParent && hwndPage )
874 if(!WinSetFocus(HWND_DESKTOP,
875 pnbp->idFocus ?
876 WinWindowFromID(hwndPage,
877 pnbp->idFocus ) : hwndPage ) )
878 {
879 // Bug in 2.0! Developers left some debug code in there!
880 USHORT usErr = HWNDERR( ppsn->hwndBook );
881 ErrorMsg("SetNBPage WinSetFocus RC(%X)",
882 usErr );
883 }
884
885 return;
886}
887
888
889/**********************************************************************/
890/*------------------------ CreateDialogPage --------------------------*/
891/* */
892/* LOAD DIALOG AND ASSOCIATE IT WITH A NOTEBOOK PAGE */
893/* */
894/* INPUT: window handle of parent and owner, */
895/* notebook window handle, */
896/* notebook page ID */
897/* dialog resource ID */
898/* dialog window procedure */
899/* */
900/* 1. */
901/* */
902/* OUTPUT: client window handle */
903/* */
904/*--------------------------------------------------------------------*/
905/**********************************************************************/
906
907static HWND NBCreateDialogPage(HWND hwndParent,
908 HWND hwndNB,
909 HMODULE hModule,
910 ULONG ulPageID,
911 ULONG idDlg,
912 FNWP fpDlg,
913 PVOID pCreationParameters)
914{
915 HWND hwndDlg;
916
917
918 if (fpDlg == NULL) /* Parameterberprfung */
919 return (NULLHANDLE); /* Fehler signalisieren */
920
921 hwndDlg = WinLoadDlg( hwndParent,
922 hwndParent,
923 fpDlg,
924 hModule,
925 idDlg,
926 pCreationParameters);
927
928 if( hwndDlg ) /* check for valid window handle */
929 {
930 if( !WinSendMsg(hwndNB, /* attach hwnd to page */
931 BKM_SETPAGEWINDOWHWND,
932 MPFROMLONG( ulPageID ),
933 MPFROMLONG( hwndDlg ) ) )
934 {
935 WinDestroyWindow( hwndDlg ); /* destroy if attach failed */
936 hwndDlg = NULLHANDLE;
937 ErrorMsg( "NBCreateDialogPage SETPAGEWINDOWHWND RC(%X)",
938 HWNDERR( hwndNB ) );
939 }
940 }
941 else
942 ErrorMsg( "NBCreateDialogPage WinLoadDlg RC(%X)", HWNDERR( hwndNB ) );
943
944 return hwndDlg;
945}
946
947
948/*****************************************************************************
949 * Name : BOOL NBSetTabText
950 * Funktion : Setzt Tabtext einer Seite.
951 * Parameter : HWND hwndNB, ULONG ulPageId, PSZ pszTabtext
952 * Variablen :
953 * Ergebnis : Erfolgscode
954 * Bemerkung :
955 *
956 * Autor : Patrick Haller [, 24.09.1995 02.57.00]
957 *****************************************************************************/
958
959static BOOL NBSetTabText (HWND hwndNB,
960 ULONG ulPageId,
961 PSZ pszTabtext)
962{
963 BOOL fSuccess;
964
965 if (pszTabtext == NULL) /* Parameterberprfung */
966 return (FALSE);
967
968 fSuccess = (BOOL) WinSendMsg(hwndNB,
969 BKM_SETTABTEXT,
970 MPFROMP( ulPageId ),
971 MPFROMP( pszTabtext ) );
972 if( !fSuccess )
973 ErrorMsg("NBSetTabText::BKM_SETTABTEXT RC(%X)",
974 HWNDERR( hwndNB ) );
975
976 return (fSuccess); /* Rckgabewert liefern */
977} /* BOOL NBSetTabText */
978
979
980/***********************************************************************
981 * Name : BOOL NBSetStatuslineText
982 * Funktion : Setzt Statuslinetext einer Seite.
983 * Parameter : HWND hwndNB, ULONG ulPageId, PSZ pszStatuslinetext
984 * Variablen :
985 * Ergebnis : Erfolgscode
986 * Bemerkung :
987 *
988 * Autor : Patrick Haller [, 24.09.1995 02.57.00]
989 ***********************************************************************/
990
991static BOOL NBSetStatuslineText (HWND hwndNB,
992 ULONG ulPageId,
993 PSZ pszStatuslinetext)
994{
995 BOOL fSuccess;
996
997 if (pszStatuslinetext == NULL) /* Parameterberprfung */
998 return (FALSE);
999
1000 fSuccess = (BOOL) WinSendMsg( hwndNB, BKM_SETSTATUSLINETEXT,
1001 MPFROMP( ulPageId ),
1002 MPFROMP( pszStatuslinetext ) );
1003 if( !fSuccess )
1004 ErrorMsg( "BKM_SETSTATUSLINETEXT RC(%X)", HWNDERR( hwndNB ) );
1005 return (fSuccess); /* Rckgabewert liefern */
1006} /* BOOL NBSetStatuslineText */
1007
1008
1009/***********************************************************************
1010 * Name : status MRESULT EXPENTRY wpDlgProcPage1
1011 * Funktion : dialog window procedure
1012 * Parameter : HWND hwnd
1013 * ULONG ulMessage
1014 * MPARAM mp1
1015 * MPARAM mp2
1016 * Variablen :
1017 * Ergebnis : MRESULT
1018 * Bemerkung :
1019 *
1020 * Autor : Patrick Haller [, 24.09.1995 02.57.00]
1021 ***********************************************************************/
1022
1023static MRESULT EXPENTRY wpDlgProcPage1(HWND hwnd,
1024 ULONG ulMessage,
1025 MPARAM mp1,
1026 MPARAM mp2)
1027{
1028 switch (ulMessage)
1029 {
1030 /*************************************************************************
1031 * user messages *
1032 *************************************************************************/
1033
1034 case UM_PROPERTY_UNDO:
1035 {
1036 PCONSOLEOPTIONS pOpt = (PCONSOLEOPTIONS)mp1; /* get pointer */
1037
1038 ConPropPage1Set(hwnd, /* set values */
1039 pOpt);
1040
1041 return ( (MPARAM) FALSE);
1042 }
1043
1044
1045 case UM_PROPERTY_APPLY:
1046 {
1047 PCONSOLEOPTIONS pOpt = (PCONSOLEOPTIONS)mp1; /* get pointer */
1048
1049 pOpt->fTerminateAutomatically = WinQueryButtonCheckstate(hwnd,
1050 CB_CONSOLE_CLOSEWINDOWONEXIT);
1051 pOpt->fInsertMode = WinQueryButtonCheckstate(hwnd,
1052 CB_CONSOLE_INSERTMODE);
1053 pOpt->fQuickInsert = WinQueryButtonCheckstate(hwnd,
1054 CB_CONSOLE_QUICKINSERT);
1055 pOpt->fToolbarActive = WinQueryButtonCheckstate(hwnd,
1056 CB_CONSOLE_TOOLBAR);
1057
1058 WinSendDlgItemMsg(hwnd, /* query the value */
1059 SPN_CONSOLE_TAB,
1060 SPBM_QUERYVALUE,
1061 MPFROMP(&pOpt->ulTabSize),
1062 MPFROM2SHORT(0,SPBQ_ALWAYSUPDATE)
1063 );
1064
1065 WinSendDlgItemMsg(hwnd, /* query the value */
1066 SPN_CONSOLE_CURSORBLINK,
1067 SPBM_QUERYVALUE,
1068 MPFROMP(&pOpt->ucCursorDivisor),
1069 MPFROM2SHORT(0,SPBQ_ALWAYSUPDATE)
1070 );
1071
1072 return ( (MPARAM) FALSE);
1073 }
1074 }
1075
1076
1077 return WinDefDlgProc(hwnd, /* default message processing */
1078 ulMessage,
1079 mp1,
1080 mp2);
1081}
1082
1083
1084/***********************************************************************
1085 * Name : status MRESULT EXPENTRY wpDlgProcPage2
1086 * Funktion : dialog window procedure
1087 * Parameter : HWND hwnd
1088 * ULONG ulMessage
1089 * MPARAM mp1
1090 * MPARAM mp2
1091 * Variablen :
1092 * Ergebnis : MRESULT
1093 * Bemerkung :
1094 *
1095 * Autor : Patrick Haller [, 24.09.1995 02.57.00]
1096 ***********************************************************************/
1097
1098static MRESULT EXPENTRY wpDlgProcPage2(HWND hwnd,
1099 ULONG ulMessage,
1100 MPARAM mp1,
1101 MPARAM mp2)
1102{
1103 switch (ulMessage)
1104 {
1105 case WM_COMMAND:
1106 {
1107 PCONSOLEOPTIONS pConsoleOptions; /* the console options structure */
1108 HWND hwndNotebook = WinQueryWindow(WinQueryWindow(hwnd,
1109 QW_PARENT),
1110 QW_PARENT);
1111
1112 pConsoleOptions = (PCONSOLEOPTIONS) /* query pointer from wnd */
1113 WinQueryWindowULong(hwndNotebook,
1114 QWL_USER);
1115
1116 switch (SHORT1FROMMP(mp1))
1117 {
1118 case ID_BTN_SPEAKERTEST:
1119 /* test speaker */
1120 DosBeep(pConsoleOptions->ulSpeakerFrequency,
1121 pConsoleOptions->ulSpeakerDuration);
1122
1123 return ( (MPARAM) FALSE);
1124 }
1125 }
1126
1127
1128 /*************************************************************************
1129 * user messages *
1130 *************************************************************************/
1131
1132 case UM_PROPERTY_UNDO:
1133 {
1134 PCONSOLEOPTIONS pOpt = (PCONSOLEOPTIONS)mp1; /* get pointer */
1135
1136 ConPropPage2Set(hwnd, /* set values */
1137 pOpt);
1138
1139 return ( (MPARAM) FALSE);
1140 }
1141
1142
1143 case UM_PROPERTY_APPLY:
1144 {
1145 PCONSOLEOPTIONS pOpt = (PCONSOLEOPTIONS)mp1; /* get pointer */
1146
1147 pOpt->fSpeakerEnabled = WinQueryButtonCheckstate(hwnd,
1148 CB_CONSOLE_SPEAKERENABLE);
1149 pOpt->ulSpeakerDuration = (ULONG)WinSendDlgItemMsg(hwnd,
1150 SLB_CONSOLE_SPEAKERDURATION,
1151 SLM_QUERYSLIDERINFO,
1152 MPFROM2SHORT(SMA_SLIDERARMPOSITION,
1153 SMA_INCREMENTVALUE),
1154 NULL);
1155
1156 pOpt->ulSpeakerFrequency = (ULONG)WinSendDlgItemMsg(hwnd,
1157 SLB_CONSOLE_SPEAKERFREQUENCY,
1158 SLM_QUERYSLIDERINFO,
1159 MPFROM2SHORT(SMA_SLIDERARMPOSITION,
1160 SMA_INCREMENTVALUE),
1161 NULL);
1162
1163 return ( (MPARAM) FALSE);
1164 }
1165 }
1166
1167
1168 return WinDefDlgProc(hwnd, /* default message processing */
1169 ulMessage,
1170 mp1,
1171 mp2);
1172}
1173
1174
1175/***********************************************************************
1176 * Name : status MRESULT EXPENTRY wpDlgProcPage3
1177 * Funktion : dialog window procedure
1178 * Parameter : HWND hwnd
1179 * ULONG ulMessage
1180 * MPARAM mp1
1181 * MPARAM mp2
1182 * Variablen :
1183 * Ergebnis : MRESULT
1184 * Bemerkung :
1185 *
1186 * Autor : Patrick Haller [, 24.09.1995 02.57.00]
1187 ***********************************************************************/
1188
1189static MRESULT EXPENTRY wpDlgProcPage3(HWND hwnd,
1190 ULONG ulMessage,
1191 MPARAM mp1,
1192 MPARAM mp2)
1193{
1194 switch (ulMessage)
1195 {
1196 /*************************************************************************
1197 * user messages *
1198 *************************************************************************/
1199
1200 case UM_PROPERTY_UNDO:
1201 {
1202 PCONSOLEOPTIONS pOpt = (PCONSOLEOPTIONS)mp1; /* get pointer */
1203
1204 ConPropPage3Set(hwnd, /* set values */
1205 pOpt);
1206
1207 return ( (MPARAM) FALSE);
1208 }
1209
1210
1211 case UM_PROPERTY_APPLY:
1212 {
1213 PCONSOLEOPTIONS pOpt = (PCONSOLEOPTIONS)mp1; /* get pointer */
1214
1215// pOpt->fTerminateAutomatically = WinQueryButtonCheckstate(hwnd,
1216// CB_CONSOLE_CLOSEWINDOWONEXIT);
1217
1218 return ( (MPARAM) FALSE);
1219 }
1220 }
1221
1222
1223 return WinDefDlgProc(hwnd, /* default message processing */
1224 ulMessage,
1225 mp1,
1226 mp2);
1227}
1228
1229
1230/***********************************************************************
1231 * Name : status MRESULT EXPENTRY wpDlgProcPage4
1232 * Funktion : dialog window procedure
1233 * Parameter : HWND hwnd
1234 * ULONG ulMessage
1235 * MPARAM mp1
1236 * MPARAM mp2
1237 * Variablen :
1238 * Ergebnis : MRESULT
1239 * Bemerkung :
1240 *
1241 * Autor : Patrick Haller [, 24.09.1995 02.57.00]
1242 ***********************************************************************/
1243
1244static MRESULT EXPENTRY wpDlgProcPage4(HWND hwnd,
1245 ULONG ulMessage,
1246 MPARAM mp1,
1247 MPARAM mp2)
1248{
1249 switch (ulMessage)
1250 {
1251 /*************************************************************************
1252 * user messages *
1253 *************************************************************************/
1254
1255 case UM_PROPERTY_UNDO:
1256 {
1257 PCONSOLEOPTIONS pOpt = (PCONSOLEOPTIONS)mp1; /* get pointer */
1258
1259 ConPropPage4Set(hwnd, /* set values */
1260 pOpt);
1261
1262 return ( (MPARAM) FALSE);
1263 }
1264
1265
1266 case UM_PROPERTY_APPLY:
1267 {
1268 PCONSOLEOPTIONS pOpt = (PCONSOLEOPTIONS)mp1; /* get pointer */
1269
1270 WinSendDlgItemMsg(hwnd, /* query the value */
1271 SPN_CONSOLE_X,
1272 SPBM_QUERYVALUE,
1273 MPFROMP(&pOpt->coordDefaultPosition.X),
1274 MPFROM2SHORT(0,SPBQ_ALWAYSUPDATE));
1275
1276 WinSendDlgItemMsg(hwnd, /* query the value */
1277 SPN_CONSOLE_Y,
1278 SPBM_QUERYVALUE,
1279 MPFROMP(&pOpt->coordDefaultPosition.Y),
1280 MPFROM2SHORT(0,SPBQ_ALWAYSUPDATE));
1281
1282 WinSendDlgItemMsg(hwnd, /* query the value */
1283 SPN_CONSOLE_DEFAULTWIDTH,
1284 SPBM_QUERYVALUE,
1285 MPFROMP(&pOpt->coordDefaultSize.X),
1286 MPFROM2SHORT(0,SPBQ_ALWAYSUPDATE));
1287
1288 WinSendDlgItemMsg(hwnd, /* query the value */
1289 SPN_CONSOLE_DEFAULTHEIGHT,
1290 SPBM_QUERYVALUE,
1291 MPFROMP(&pOpt->coordDefaultSize.Y),
1292 MPFROM2SHORT(0,SPBQ_ALWAYSUPDATE));
1293
1294 WinSendDlgItemMsg(hwnd, /* query the value */
1295 SPN_CONSOLE_BUFFERWIDTH,
1296 SPBM_QUERYVALUE,
1297 MPFROMP(&pOpt->coordBufferSize.X),
1298 MPFROM2SHORT(0,SPBQ_ALWAYSUPDATE));
1299
1300 WinSendDlgItemMsg(hwnd, /* query the value */
1301 SPN_CONSOLE_BUFFERHEIGHT,
1302 SPBM_QUERYVALUE,
1303 MPFROMP(&pOpt->coordBufferSize.Y),
1304 MPFROM2SHORT(0,SPBQ_ALWAYSUPDATE));
1305
1306 return ( (MPARAM) FALSE);
1307 }
1308 }
1309
1310
1311 return WinDefDlgProc(hwnd, /* default message processing */
1312 ulMessage,
1313 mp1,
1314 mp2);
1315}
1316
1317
1318/***********************************************************************
1319 * Name : status MRESULT EXPENTRY wpDlgProcPage5
1320 * Funktion : dialog window procedure
1321 * Parameter : HWND hwnd
1322 * ULONG ulMessage
1323 * MPARAM mp1
1324 * MPARAM mp2
1325 * Variablen :
1326 * Ergebnis : MRESULT
1327 * Bemerkung :
1328 *
1329 * Autor : Patrick Haller [, 24.09.1995 02.57.00]
1330 ***********************************************************************/
1331
1332static MRESULT EXPENTRY wpDlgProcPage5(HWND hwnd,
1333 ULONG ulMessage,
1334 MPARAM mp1,
1335 MPARAM mp2)
1336{
1337 switch (ulMessage)
1338 {
1339 /*************************************************************************
1340 * user messages *
1341 *************************************************************************/
1342
1343 case UM_PROPERTY_UNDO:
1344 {
1345 PCONSOLEOPTIONS pOpt = (PCONSOLEOPTIONS)mp1; /* get pointer */
1346
1347 ConPropPage5Set(hwnd, /* set values */
1348 pOpt);
1349
1350 return ( (MPARAM) FALSE);
1351 }
1352
1353
1354 case UM_PROPERTY_APPLY:
1355 {
1356 PCONSOLEOPTIONS pOpt = (PCONSOLEOPTIONS)mp1; /* get pointer */
1357
1358 WinSendDlgItemMsg(hwnd, /* query the value */
1359 SPN_CONSOLE_UPDATELIMIT,
1360 SPBM_QUERYVALUE,
1361 MPFROMP(&pOpt->ulUpdateLimit),
1362 MPFROM2SHORT(0,SPBQ_ALWAYSUPDATE));
1363
1364 WinSendDlgItemMsg(hwnd, /* query the value */
1365 SPN_CONSOLE_CONSOLEPRIORITY,
1366 SPBM_QUERYVALUE,
1367 MPFROMP(&pOpt->ulConsoleThreadPriorityClass),
1368 MPFROM2SHORT(0,SPBQ_ALWAYSUPDATE));
1369
1370 WinSendDlgItemMsg(hwnd, /* query the value */
1371 SPN_CONSOLE_CONSOLEPRIODELTA,
1372 SPBM_QUERYVALUE,
1373 MPFROMP(&pOpt->ulConsoleThreadPriorityDelta),
1374 MPFROM2SHORT(0,SPBQ_ALWAYSUPDATE));
1375
1376 WinSendDlgItemMsg(hwnd, /* query the value */
1377 SPN_CONSOLE_APPPRIORITY,
1378 SPBM_QUERYVALUE,
1379 MPFROMP(&pOpt->ulAppThreadPriorityClass),
1380 MPFROM2SHORT(0,SPBQ_ALWAYSUPDATE));
1381
1382 WinSendDlgItemMsg(hwnd, /* query the value */
1383 SPN_CONSOLE_APPPRIODELTA,
1384 SPBM_QUERYVALUE,
1385 MPFROMP(&pOpt->ulAppThreadPriorityDelta),
1386 MPFROM2SHORT(0,SPBQ_ALWAYSUPDATE));
1387
1388 return ( (MPARAM) FALSE);
1389 }
1390 }
1391
1392
1393 return WinDefDlgProc(hwnd, /* default message processing */
1394 ulMessage,
1395 mp1,
1396 mp2);
1397}
1398
1399
1400/***********************************************************************
1401 * Name : status MRESULT EXPENTRY wpDlgProcPage6
1402 * Funktion : dialog window procedure
1403 * Parameter : HWND hwnd
1404 * ULONG ulMessage
1405 * MPARAM mp1
1406 * MPARAM mp2
1407 * Variablen :
1408 * Ergebnis : MRESULT
1409 * Bemerkung :
1410 *
1411 * Autor : Patrick Haller [, 24.09.1995 02.57.00]
1412 ***********************************************************************/
1413
1414static MRESULT EXPENTRY wpDlgProcPage6(HWND hwnd,
1415 ULONG ulMessage,
1416 MPARAM mp1,
1417 MPARAM mp2)
1418{
1419 /* since this dialog has no options, we're running the default message */
1420 /* processing only */
1421 /* we'll display a logo bitmap here shortly @@@PH */
1422
1423 return WinDefDlgProc(hwnd, /* default message processing */
1424 ulMessage,
1425 mp1,
1426 mp2);
1427}
1428
1429
1430/**********************************************************************/
1431/*-------------------------- GetStringSize ---------------------------*/
1432/* */
1433/* GET THE SIZE IN PIXELS OF A STRING. */
1434/* */
1435/* INPUT: presentation space handle, */
1436/* notebook window handle, */
1437/* pointer to string */
1438/* */
1439/* 1. */
1440/* */
1441/* OUTPUT: nothing */
1442/* */
1443/*--------------------------------------------------------------------*/
1444/**********************************************************************/
1445
1446static INT WinGetStringSize(HPS hps,
1447 PSZ szString )
1448{
1449 POINTL aptl[ TXTBOX_COUNT ];
1450
1451 if (szString == NULL) /* Parameterberprfung */
1452 return 0; /* Im Fehlerfall wird 0 zurckgegeben */
1453
1454
1455 /* Get the size, in pixels, of the string passed. */
1456 if( !GpiQueryTextBox( hps,
1457 strlen( szString ),
1458 szString,
1459 TXTBOX_COUNT,
1460 aptl ) )
1461 return 0; /* Im Fehlerfall wird 0 zurckgegeben */
1462 else
1463 return aptl[ TXTBOX_CONCAT ].x;
1464}
1465
1466
1467/*****************************************************************************
1468 * Name : static APIRET ConPropPage1Set
1469 * Funktion : setup dialog elements for page 1
1470 * Parameter :
1471 * Variablen :
1472 * Ergebnis : MRESULT
1473 * Bemerkung :
1474 *
1475 * Autor : Patrick Haller [1998/04/02 19:00]
1476 *****************************************************************************/
1477
1478static APIRET ConPropPage1Set(HWND hwndDlg,
1479 PCONSOLEOPTIONS pConsoleOptions)
1480{
1481 if (pConsoleOptions == NULL) /* check parameters */
1482 return (ERROR_INVALID_PARAMETER); /* raise error condition */
1483
1484 WinCheckButton(hwndDlg, /* auto-termination */
1485 CB_CONSOLE_CLOSEWINDOWONEXIT,
1486 pConsoleOptions->fTerminateAutomatically);
1487
1488 WinCheckButton(hwndDlg, /* insert mode */
1489 CB_CONSOLE_INSERTMODE,
1490 pConsoleOptions->fInsertMode);
1491
1492 WinCheckButton(hwndDlg, /* quick insert mode */
1493 CB_CONSOLE_QUICKINSERT,
1494 pConsoleOptions->fQuickInsert);
1495
1496 WinCheckButton(hwndDlg, /* console toolbar */
1497 CB_CONSOLE_TOOLBAR,
1498 pConsoleOptions->fToolbarActive);
1499
1500 /* set spin limits for the SPN_CONSOLE_TAB spinbutton */
1501 WinSendDlgItemMsg(hwndDlg,
1502 SPN_CONSOLE_TAB,
1503 SPBM_SETLIMITS,
1504 MPFROMSHORT(80),
1505 MPFROMSHORT(0));
1506
1507 WinSendDlgItemMsg (hwndDlg, /* set current value */
1508 SPN_CONSOLE_TAB,
1509 SPBM_SETCURRENTVALUE,
1510 MPFROMLONG(pConsoleOptions->ulTabSize),
1511 0);
1512
1513 /* set spin limits for the SPN_CONSOLE_CURSORBLINK spinbutton */
1514 WinSendDlgItemMsg(hwndDlg,
1515 SPN_CONSOLE_CURSORBLINK,
1516 SPBM_SETLIMITS,
1517 MPFROMSHORT(100),
1518 MPFROMSHORT(1));
1519
1520 WinSendDlgItemMsg (hwndDlg, /* set current value */
1521 SPN_CONSOLE_CURSORBLINK,
1522 SPBM_SETCURRENTVALUE,
1523 MPFROMLONG(pConsoleOptions->ucCursorDivisor),
1524 0);
1525
1526 return (NO_ERROR); /* OK */
1527}
1528
1529/*****************************************************************************
1530 * Name : static APIRET ConPropPage2Set
1531 * Funktion : setup dialog elements for page 2
1532 * Parameter :
1533 * Variablen :
1534 * Ergebnis : MRESULT
1535 * Bemerkung :
1536 *
1537 * Autor : Jochen Schaeuble [1998/04/29 23:20]
1538 *****************************************************************************/
1539
1540static APIRET ConPropPage2Set(HWND hwndDlg,
1541 PCONSOLEOPTIONS pConsoleOptions)
1542{
1543 int i;
1544 WNDPARAMS wp;
1545 SLDCDATA slcd;
1546
1547 if (pConsoleOptions == NULL) /* check parameters */
1548 return (ERROR_INVALID_PARAMETER); /* raise error condition */
1549
1550 WinCheckButton(hwndDlg, /* Enable speaker */
1551 CB_CONSOLE_SPEAKERENABLE,
1552 pConsoleOptions->fSpeakerEnabled);
1553
1554 /* frequency slider */
1555 slcd.cbSize = sizeof(SLDCDATA);
1556 wp.pCtlData = &slcd;
1557
1558 WinSendDlgItemMsg(hwndDlg,
1559 SLB_CONSOLE_SPEAKERFREQUENCY,
1560 WM_QUERYWINDOWPARAMS,
1561 (MPARAM)&wp,
1562 NULL);
1563
1564 slcd.usScale1Increments=9;
1565 slcd.usScale1Spacing=0;
1566
1567 WinSendDlgItemMsg(hwndDlg,
1568 SLB_CONSOLE_SPEAKERFREQUENCY,
1569 WM_SETWINDOWPARAMS,
1570 (MPARAM)&wp,
1571 NULL);
1572
1573 WinSendDlgItemMsg(hwndDlg,
1574 SLB_CONSOLE_SPEAKERFREQUENCY,
1575 SLM_SETTICKSIZE,
1576 MPFROM2SHORT(SMA_SETALLTICKS, 40),
1577 NULL);
1578
1579 /* duration slider */
1580 slcd.cbSize = sizeof(SLDCDATA);
1581 wp.pCtlData = &slcd;
1582
1583 WinSendDlgItemMsg(hwndDlg,
1584 SLB_CONSOLE_SPEAKERDURATION,
1585 WM_QUERYWINDOWPARAMS,
1586 (MPARAM)&wp,
1587 NULL);
1588
1589 slcd.usScale1Increments=9;
1590 slcd.usScale1Spacing=0;
1591
1592 WinSendDlgItemMsg(hwndDlg,
1593 SLB_CONSOLE_SPEAKERDURATION,
1594 WM_SETWINDOWPARAMS,
1595 (MPARAM)&wp,
1596 NULL);
1597
1598 WinSendDlgItemMsg(hwndDlg,
1599 SLB_CONSOLE_SPEAKERDURATION,
1600 SLM_SETTICKSIZE,
1601 MPFROM2SHORT(SMA_SETALLTICKS, 40),
1602 NULL);
1603
1604
1605 return (NO_ERROR); /* OK */
1606}
1607
1608/*****************************************************************************
1609 * Name : static APIRET ConPropPage3Set
1610 * Funktion : setup dialog elements for page 3
1611 * Parameter :
1612 * Variablen :
1613 * Ergebnis : MRESULT
1614 * Bemerkung :
1615 *
1616 * Autor : Jochen Schaeuble [1998/04/29 23:20]
1617 *****************************************************************************/
1618
1619static APIRET ConPropPage3Set(HWND hwndDlg,
1620 PCONSOLEOPTIONS pConsoleOptions)
1621{
1622 if (pConsoleOptions == NULL) /* check parameters */
1623 return (ERROR_INVALID_PARAMETER); /* raise error condition */
1624
1625 /* setup check-button */
1626
1627
1628 WinCheckButton(hwndDlg, /* Override default */
1629 CB_CONSOLE_WINDOWPOSITION,
1630 pConsoleOptions->fSetWindowPosition);
1631
1632 /* setup limits for spin-buttons */
1633
1634 WinSendDlgItemMsg(hwndDlg,
1635 SPN_CONSOLE_X,
1636 SPBM_SETLIMITS,
1637 MPFROMSHORT(WinQuerySysValue(HWND_DESKTOP, SV_CXSCREEN)-1),
1638 MPFROMSHORT(0));
1639
1640 WinSendDlgItemMsg(hwndDlg,
1641 SPN_CONSOLE_Y,
1642 SPBM_SETLIMITS,
1643 MPFROMSHORT(WinQuerySysValue(HWND_DESKTOP, SV_CYSCREEN)-1),
1644 MPFROMSHORT(0));
1645
1646 WinSendDlgItemMsg(hwndDlg,
1647 SPN_CONSOLE_DEFAULTWIDTH,
1648 SPBM_SETLIMITS,
1649 MPFROMSHORT(WinQuerySysValue(HWND_DESKTOP, SV_CXSCREEN)-1),
1650 MPFROMSHORT(0));
1651
1652 WinSendDlgItemMsg(hwndDlg,
1653 SPN_CONSOLE_DEFAULTHEIGHT,
1654 SPBM_SETLIMITS,
1655 MPFROMSHORT(WinQuerySysValue(HWND_DESKTOP, SV_CYSCREEN)-1),
1656 MPFROMSHORT(0));
1657
1658 WinSendDlgItemMsg(hwndDlg,
1659 SPN_CONSOLE_BUFFERWIDTH,
1660 SPBM_SETLIMITS,
1661 MPFROMSHORT(9999),
1662 MPFROMSHORT(0));
1663
1664 WinSendDlgItemMsg(hwndDlg,
1665 SPN_CONSOLE_BUFFERHEIGHT,
1666 SPBM_SETLIMITS,
1667 MPFROMSHORT(9999),
1668 MPFROMSHORT(0));
1669
1670
1671 /* setup active values */
1672
1673 WinSendDlgItemMsg(hwndDlg,
1674 SPN_CONSOLE_X,
1675 SPBM_SETCURRENTVALUE,
1676 MPFROMLONG(pConsoleOptions->coordDefaultPosition.X),
1677 0);
1678
1679 WinSendDlgItemMsg(hwndDlg,
1680 SPN_CONSOLE_Y,
1681 SPBM_SETCURRENTVALUE,
1682 MPFROMLONG(pConsoleOptions->coordDefaultPosition.Y),
1683 0);
1684
1685 WinSendDlgItemMsg(hwndDlg,
1686 SPN_CONSOLE_DEFAULTWIDTH,
1687 SPBM_SETCURRENTVALUE,
1688 MPFROMLONG(pConsoleOptions->coordDefaultSize.X),
1689 0);
1690
1691 WinSendDlgItemMsg(hwndDlg,
1692 SPN_CONSOLE_DEFAULTHEIGHT,
1693 SPBM_SETCURRENTVALUE,
1694 MPFROMLONG(pConsoleOptions->coordDefaultSize.Y),
1695 0);
1696
1697 WinSendDlgItemMsg(hwndDlg,
1698 SPN_CONSOLE_BUFFERWIDTH,
1699 SPBM_SETCURRENTVALUE,
1700 MPFROMLONG(pConsoleOptions->coordBufferSize.X),
1701 0);
1702
1703 WinSendDlgItemMsg(hwndDlg,
1704 SPN_CONSOLE_BUFFERHEIGHT,
1705 SPBM_SETCURRENTVALUE,
1706 MPFROMLONG(pConsoleOptions->coordBufferSize.Y),
1707 0);
1708
1709
1710 return (NO_ERROR); /* OK */
1711}
1712
1713
1714/*****************************************************************************
1715 * Name : static APIRET ConPropPage4Set
1716 * Funktion : setup dialog elements for page 4
1717 * Parameter :
1718 * Variablen :
1719 * Ergebnis : MRESULT
1720 * Bemerkung :
1721 *
1722 * Autor : Patrick Haller [1998/06/13 23:20]
1723 *****************************************************************************/
1724
1725static APIRET ConPropPage4Set(HWND hwndDlg,
1726 PCONSOLEOPTIONS pConsoleOptions)
1727{
1728 ULONG ulColor; /* loop counter for the colors */
1729 ULONG ulRow;
1730 ULONG ulColumn;
1731
1732#define MAX_TRANSCOLORS 16
1733 static const ULONG TabColorTranslation[MAX_TRANSCOLORS] =
1734 { /* RRGGBB */
1735 /* 1 */ 0x00000000,
1736 /* 2 */ 0x0000007f,
1737 /* 3 */ 0x00007f00,
1738 /* 4 */ 0x007f0000,
1739 /* 5 */ 0x00007f7f,
1740 /* 6 */ 0x007f007f,
1741 /* 7 */ 0x007f7f00,
1742 /* 8 */ 0x007f7f7f,
1743 /* 9 */ 0x00808080,
1744 /* 10 */ 0x008080ff,
1745 /* 11 */ 0x0080ff80,
1746 /* 12 */ 0x00ff8080,
1747 /* 13 */ 0x0080ffff,
1748 /* 14 */ 0x00ff80ff,
1749 /* 15 */ 0x00ffff80,
1750 /* 16 */ 0x00ffffff
1751 };
1752
1753
1754 if (pConsoleOptions == NULL) /* check parameters */
1755 return (ERROR_INVALID_PARAMETER); /* raise error condition */
1756
1757 /* setup the value sets */
1758 for (ulColor = 0;
1759 ulColor < MAX_TRANSCOLORS;
1760 ulColor++)
1761 {
1762 ulRow = 1 + (ulColor & 0x01); /* calculate field index */
1763 ulColumn = 1 + (ulColor >> 1);
1764
1765 /* foreground */
1766 WinSendDlgItemMsg (hwndDlg,
1767 VS_CONSOLE_FOREGROUND,
1768 VM_SETITEMATTR,
1769 MPFROM2SHORT(ulRow, ulColumn),
1770 MPFROM2SHORT(VIA_RGB, TRUE) );
1771
1772 WinSendDlgItemMsg (hwndDlg,
1773 VS_CONSOLE_FOREGROUND,
1774 VM_SETITEM,
1775 MPFROM2SHORT(ulRow, ulColumn),
1776 (MPARAM) TabColorTranslation[ulColor] );
1777
1778 /* background */
1779 WinSendDlgItemMsg (hwndDlg,
1780 VS_CONSOLE_BACKGROUND,
1781 VM_SETITEMATTR,
1782 MPFROM2SHORT(ulRow, ulColumn),
1783 MPFROM2SHORT(VIA_RGB, TRUE) );
1784
1785 WinSendDlgItemMsg (hwndDlg,
1786 VS_CONSOLE_BACKGROUND,
1787 VM_SETITEM,
1788 MPFROM2SHORT(ulRow, ulColumn),
1789 (MPARAM) TabColorTranslation[ulColor] );
1790 }
1791
1792
1793 /* @@@PH fonts */
1794
1795 return (NO_ERROR); /* OK */
1796}
1797
1798
1799/*****************************************************************************
1800 * Name : static APIRET ConPropPage5Set
1801 * Funktion : setup dialog elements for page 5
1802 * Parameter :
1803 * Variablen :
1804 * Ergebnis : MRESULT
1805 * Bemerkung :
1806 *
1807 * Autor : Jochen Schaeuble [1998/04/29 23:20]
1808 *****************************************************************************/
1809
1810static APIRET ConPropPage5Set(HWND hwndDlg,
1811 PCONSOLEOPTIONS pConsoleOptions)
1812{
1813 if (pConsoleOptions == NULL) /* check parameters */
1814 return (ERROR_INVALID_PARAMETER); /* raise error condition */
1815// #define PRTYC_NOCHANGE 0
1816// #define PRTYC_IDLETIME 1
1817// #define PRTYC_REGULAR 2
1818// #define PRTYC_TIMECRITICAL 3
1819// #define PRTYC_FOREGROUNDSERVER 4
1820
1821// /* Priority deltas */
1822
1823// #define PRTYD_MINIMUM -31
1824// #define PRTYD_MAXIMUM 31
1825 /* setup application-priorities */
1826
1827 WinSendDlgItemMsg(hwndDlg,
1828 SPN_CONSOLE_APPPRIORITY,
1829 SPBM_SETARRAY,
1830 priorities,
1831 MPFROMLONG(NUMPRIORITIES));
1832
1833 WinSendDlgItemMsg(hwndDlg,
1834 SPN_CONSOLE_APPPRIORITY,
1835 SPBM_SETCURRENTVALUE,
1836 MPFROMLONG(pConsoleOptions->ulConsoleThreadPriorityClass-1),
1837 NULL);
1838
1839 WinSendDlgItemMsg(hwndDlg,
1840 SPN_CONSOLE_APPPRIODELTA,
1841 SPBM_SETLIMITS,
1842 MPFROMSHORT(PRTYD_MAXIMUM),
1843 MPFROMSHORT(0));
1844
1845
1846 WinSendDlgItemMsg(hwndDlg, /* set current value */
1847 SPN_CONSOLE_APPPRIODELTA,
1848 SPBM_SETCURRENTVALUE,
1849 MPFROMLONG(0),
1850 0);
1851
1852 /* setup console-priorities */
1853
1854 WinSendDlgItemMsg(hwndDlg,
1855 SPN_CONSOLE_CONSOLEPRIORITY,
1856 SPBM_SETARRAY,
1857 priorities,
1858 MPFROMLONG(NUMPRIORITIES));
1859
1860 WinSendDlgItemMsg(hwndDlg,
1861 SPN_CONSOLE_CONSOLEPRIORITY,
1862 SPBM_SETCURRENTVALUE,
1863 MPFROMLONG(pConsoleOptions->ulConsoleThreadPriorityClass-1),
1864 NULL);
1865
1866 WinSendDlgItemMsg(hwndDlg,
1867 SPN_CONSOLE_CONSOLEPRIODELTA,
1868 SPBM_SETLIMITS,
1869 MPFROMSHORT(PRTYD_MAXIMUM),
1870 MPFROMSHORT(0));
1871
1872
1873 WinSendDlgItemMsg(hwndDlg, /* set current value */
1874 SPN_CONSOLE_CONSOLEPRIODELTA,
1875 SPBM_SETCURRENTVALUE,
1876 MPFROMLONG(0),
1877 0);
1878
1879 WinSendDlgItemMsg(hwndDlg,
1880 SPN_CONSOLE_UPDATELIMIT,
1881 SPBM_SETLIMITS,
1882 MPFROMSHORT(50),
1883 MPFROMSHORT(0));
1884
1885 return (NO_ERROR); /* OK */
1886}
1887
1888
1889
1890
1891
1892
1893
1894
1895#if 0
1896DLGTEMPLATE DLG_CONSOLE_PAGE3
1897 CONTROL "Sample", SPN_CONSOLE_X, 49, 60, 48, 12, WC_SPINBUTTON, SPBS_MASTER | SPBS_NUMERICONLY | SPBS_JUSTLEFT | WS_VISIBLE | WS_GROUP | WS_TABSTOP
1898 CONTROL "Sample", SPN_CONSOLE_Y, 49, 45, 48, 12, WC_SPINBUTTON, SPBS_MASTER | SPBS_NUMERICONLY | SPBS_JUSTLEFT | WS_VISIBLE | WS_GROUP | WS_TABSTOP
1899 CONTROL "Sample", SPN_CONSOLE_DEFAULTWIDTH, 155, 60, 48, 12, WC_SPINBUTTON, SPBS_MASTER | SPBS_NUMERICONLY | SPBS_JUSTLEFT | WS_VISIBLE | WS_GROUP | WS_TABSTOP
1900 CONTROL "Sample", SPN_CONSOLE_DEFAULTHEIGHT, 155, 45, 48, 12, WC_SPINBUTTON, SPBS_MASTER | SPBS_NUMERICONLY | SPBS_JUSTLEFT | WS_VISIBLE | WS_GROUP | WS_TABSTOP
1901 CONTROL "~Override default position and size", CB_CONSOLE_WINDOWPOSITION, 8, 80, 155, 10, WC_BUTTON, BS_AUTOCHECKBOX | WS_VISIBLE | WS_GROUP | WS_TABSTOP
1902 CONTROL "Sample", SPN_CONSOLE_BUFFERWIDTH, 49, 19, 48, 12, WC_SPINBUTTON, SPBS_MASTER | SPBS_NUMERICONLY | SPBS_JUSTLEFT | WS_VISIBLE | WS_GROUP | WS_TABSTOP
1903 CONTROL "Sample", SPN_CONSOLE_BUFFERHEIGHT, 155, 19, 48, 12, WC_SPINBUTTON, SPBS_MASTER | SPBS_NUMERICONLY | SPBS_JUSTLEFT | WS_VISIBLE | WS_GROUP | WS_TABSTOP
1904 CONTROL "Buffer allocates .. MB memory.", ST_CONSOLE_BUFFERMEMORY, 8, 6, 194, 8, WC_STATIC, SS_TEXT | DT_LEFT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
1905
1906DLGTEMPLATE DLG_CONSOLE_PAGE5
1907 CONTROL "Sample", SPN_CONSOLE_APPPRIORITY, 46, 52, 48, 12, WC_SPINBUTTON, SPBS_MASTER | SPBS_READONLY | SPBS_JUSTLEFT | WS_VISIBLE | WS_GROUP | WS_TABSTOP
1908 CONTROL "Sample", SPN_CONSOLE_APPPRIODELTA, 154, 52, 48, 12, WC_SPINBUTTON, SPBS_MASTER | SPBS_ALLCHARACTERS | SPBS_JUSTLEFT | WS_VISIBLE | WS_GROUP | WS_TABSTOP
1909 CONTROL "Sample", SPN_CONSOLE_CONSOLEPRIORITY, 46, 20, 48, 12, WC_SPINBUTTON, SPBS_MASTER | SPBS_ALLCHARACTERS | SPBS_JUSTLEFT | WS_VISIBLE | WS_GROUP | WS_TABSTOP
1910 CONTROL "Sample", SPN_CONSOLE_CONSOLEPRIODELTA, 154, 20, 48, 12, WC_SPINBUTTON, SPBS_MASTER | SPBS_ALLCHARACTERS | SPBS_JUSTLEFT | WS_VISIBLE | WS_GROUP | WS_TABSTOP
1911 CONTROL "Sample", SPN_CONSOLE_UPDATELIMIT, 113, 5, 89, 12, WC_SPINBUTTON, SPBS_MASTER | SPBS_ALLCHARACTERS | SPBS_JUSTLEFT | WS_VISIBLE | WS_GROUP | WS_TABSTOP
1912
1913DLGTEMPLATE DLG_CONSOLE_PAGE4
1914 CONTROL "...", VS_CONSOLE_FOREGROUND, 6, 56, 95, 34, WC_VALUESET, VS_RGB | VS_BORDER | VS_ITEMBORDER | WS_VISIBLE | WS_GROUP | WS_TABSTOP
1915 CONTROL "...", VS_CONSOLE_BACKGROUND, 103, 56, 99, 34, WC_VALUESET, VS_RGB | VS_BORDER | VS_ITEMBORDER | WS_VISIBLE | WS_GROUP | WS_TABSTOP
1916 CONTROL "Sample", LB_CONSOLE_FONTS, 6, 4, 95, 36, WC_LISTBOX, WS_VISIBLE | WS_GROUP | WS_TABSTOP
1917 CONTROL "00 x 00", ST_CONSOLE_WINDOWSIZE, 156, 16, 47, 8, WC_STATIC, SS_TEXT | DT_LEFT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
1918 CONTROL "00 x 00", ST_CONSOLE_SCREENSIZE, 156, 4, 47, 8, WC_STATIC, SS_TEXT | DT_LEFT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
1919
1920#endif
1921
Note: See TracBrowser for help on using the repository browser.