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

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

Add: added cvs variable $Id$ to the source files.

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