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

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

Console property update

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