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

Last change on this file since 22018 was 21916, checked in by dmik, 14 years ago

Merge branch gcc-kmk to trunk.

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