Changeset 5160 for trunk/src


Ignore:
Timestamp:
Feb 17, 2001, 9:25:44 PM (25 years ago)
Author:
bird
Message:

Merged in notebook changes.

Location:
trunk/src/win32k/utils
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/win32k/utils/Dialog.h

    r5119 r5160  
    1 /* $Id: Dialog.h,v 1.2 2001-02-11 23:41:46 bird Exp $
     1/* $Id: Dialog.h,v 1.3 2001-02-17 20:25:44 bird Exp $
    22 *
    33 * Dialog IDs.
     
    2121
    2222/*
    23  * The Win32kCC (main) dialog.
     23 * The Win32kCC (main) notebook dialog.
    2424 */
    25 #define DL_WIN32KCC                 1000
     25#define DL_WIN32KCC                 1001
     26#define DL_WIN32KCC_OLD             1000
     27#define DL_WIN32KCC_NTBK            1002
    2628
    27 #define GR_LOGGING                  1010
    28 #define CB_LOGGING_ENABLED          1011
    29 #define RB_LOGGING_COM1             1012
    30 #define RB_LOGGING_COM2             1013
    31 #define RB_LOGGING_COM3             1014
    32 #define RB_LOGGING_COM4             1015
     29/*
     30 * The Logging Page.
     31 */
     32#define DL_LOGGING_PAGE             1100
     33#define GR_LOGGING                  1101
     34#define CB_LOGGING_ENABLED          1102
     35#define RB_LOGGING_COM1             1103
     36#define RB_LOGGING_COM2             1104
     37#define RB_LOGGING_COM3             1105
     38#define RB_LOGGING_COM4             1106
    3339
     40/*
     41 * The Loader Page.
     42 */
     43#define DL_LOADERS_PAGE             1200
     44#define GR_LOADERS                  1201
     45#define CB_LDR_DISABLE_ALL          1202
    3446
    35 #define GR_LOADERS                  1030
    36 #define CB_LDR_DISABLE_ALL          1031
     47#define GR_LDR_PE                   1210
     48#define RB_LDR_PE_PURE              1211
     49#define RB_LDR_PE_MIXED             1212
     50#define RB_LDR_PE_PE                1213
     51#define RB_LDR_PE_NOT               1214
     52#define TX_LDR_PE_INFOLEVEL         1215
     53#define SB_LDR_PE_INFOLEVEL         1216
     54#define TX_LDR_PE_MODULES           1217
     55#define TX_LDR_PE_MODULES_VAL       1218
     56#define CK_LDR_PE_ONEOBJECT         1219
    3757
    38 #define GR_LDR_PE                   1040
    39 #define RB_LDR_PE_PURE              1041
    40 #define RB_LDR_PE_MIXED             1042
    41 #define RB_LDR_PE_PE                1043
    42 #define RB_LDR_PE_NOT               1044
    43 #define TX_LDR_PE_INFOLEVEL         1045
    44 #define SB_LDR_PE_INFOLEVEL         1046
    45 #define TX_LDR_PE_MODULES           1047
    46 #define TX_LDR_PE_MODULES_VAL       1048
    47 #define CK_LDR_PE_ONEOBJECT         1049
     58#define GR_LDR_ELF                  1240
     59#define CB_LDR_ELF_ENABLED          1241
     60#define TX_LDR_ELF_INFOLEVEL        1242
     61#define SB_LDR_ELF_INFOLEVEL        1243
     62#define TX_LDR_ELF_MODULES          1244
     63#define TX_LDR_ELF_MODULES_VAL      1245
    4864
    49 #define GR_LDR_ELF                  1060
    50 #define CB_LDR_ELF_ENABLED          1061
    51 #define TX_LDR_ELF_INFOLEVEL        1062
    52 #define SB_LDR_ELF_INFOLEVEL        1063
    53 #define TX_LDR_ELF_MODULES          1064
    54 #define TX_LDR_ELF_MODULES_VAL      1065
     65#define CB_LDR_SHELL_SCRIPTS        1260
     66#define CB_LDR_JAVA                 1270
     67#define CB_LDR_REXX                 1280
    5568
    56 #define CB_LDR_SHELL_SCRIPTS        1070
    57 #define CB_LDR_JAVA                 1080
    58 #define CB_LDR_REXX                 1090
     69/*
     70 * The Heaps Page.
     71 */
     72#define DL_HEAPS_PAGE               1300
     73#define GR_HEAPS                    1301
    5974
     75#define GR_HEAP_RES                 1310
     76#define TX_HEAP_RES_MAX             1311
     77#define SB_HEAP_RES_MAX             1312
     78#define TX_HEAP_RES_INIT            1313
     79#define TX_HEAP_RES_INIT_VAL        1314
     80#define TX_HEAP_RES_USED            1315
     81#define TX_HEAP_RES_USED_VAL        1316
     82#define TX_HEAP_RES_FREE            1317
     83#define TX_HEAP_RES_FREE_VAL        1318
     84#define TX_HEAP_RES_SIZE            1319
     85#define TX_HEAP_RES_SIZE_VAL        1320
     86#define TX_HEAP_RES_USED_BLOCKS     1321
     87#define TX_HEAP_RES_USED_BLOCKS_VAL 1322
     88#define TX_HEAP_RES_FREE_BLOCKS     1323
     89#define TX_HEAP_RES_FREE_BLOCKS_VAL 1324
    6090
    61 #define GR_HEAPS                    1150
     91#define GR_HEAP_SWP                 1340
     92#define TX_HEAP_SWP_MAX             1341
     93#define SB_HEAP_SWP_MAX             1342
     94#define TX_HEAP_SWP_INIT            1343
     95#define TX_HEAP_SWP_INIT_VAL        1344
     96#define TX_HEAP_SWP_USED            1345
     97#define TX_HEAP_SWP_USED_VAL        1346
     98#define TX_HEAP_SWP_FREE            1347
     99#define TX_HEAP_SWP_FREE_VAL        1348
     100#define TX_HEAP_SWP_SIZE            1349
     101#define TX_HEAP_SWP_SIZE_VAL        1350
     102#define TX_HEAP_SWP_USED_BLOCKS     1351
     103#define TX_HEAP_SWP_USED_BLOCKS_VAL 1352
     104#define TX_HEAP_SWP_FREE_BLOCKS     1353
     105#define TX_HEAP_SWP_FREE_BLOCKS_VAL 1354
    62106
    63 #define GR_HEAP_RES                 1160
    64 #define TX_HEAP_RES_MAX             1161
    65 #define SB_HEAP_RES_MAX             1162
    66 #define TX_HEAP_RES_INIT            1163
    67 #define TX_HEAP_RES_INIT_VAL        1164
    68 #define TX_HEAP_RES_USED            1165
    69 #define TX_HEAP_RES_USED_VAL        1166
    70 #define TX_HEAP_RES_FREE            1167
    71 #define TX_HEAP_RES_FREE_VAL        1168
    72 #define TX_HEAP_RES_SIZE            1169
    73 #define TX_HEAP_RES_SIZE_VAL        1170
    74 #define TX_HEAP_RES_USED_BLOCKS     1171
    75 #define TX_HEAP_RES_USED_BLOCKS_VAL 1172
    76 #define TX_HEAP_RES_FREE_BLOCKS     1173
    77 #define TX_HEAP_RES_FREE_BLOCKS_VAL 1174
     107/*
     108 * The Status Page.
     109 */
     110#define PG_WIN32K_INFO_PAGE         1400
     111#define GR_W32K                     1401
     112#define TX_W32K_VERSION             1402
     113#define TX_W32K_VERSION_VAL         1403
     114#define TX_W32K_BUILD_DATETIME      1404
     115#define TX_W32K_BUILD_DATETIME_VAL  1405
     116#define TX_W32K_SYMBOLFILE          1406
     117#define TX_W32K_SYMBOLFILE_VAL      1407
     118#define TX_W32K_KERNELBUILD         1408
     119#define TX_W32K_KERNELBUILD_VAL     1409
    78120
     121/*
     122 * The Loader/OS extention Page
     123 */
     124#define DL_LDRFIX_PAGE              1500
     125#define GR_LDRFIX                   1501
     126#define CB_LDRFIX_DLLFIXES          1502
     127#define CB_LDRFIX_EXEFIXES          1503
     128#define CB_LDRFIX_FORCEPRELOAD      1504
    79129
    80 #define GR_HEAP_SWP                 1180
    81 #define TX_HEAP_SWP_MAX             1181
    82 #define SB_HEAP_SWP_MAX             1182
    83 #define TX_HEAP_SWP_INIT            1183
    84 #define TX_HEAP_SWP_INIT_VAL        1184
    85 #define TX_HEAP_SWP_USED            1185
    86 #define TX_HEAP_SWP_USED_VAL        1186
    87 #define TX_HEAP_SWP_FREE            1187
    88 #define TX_HEAP_SWP_FREE_VAL        1188
    89 #define TX_HEAP_SWP_SIZE            1189
    90 #define TX_HEAP_SWP_SIZE_VAL        1190
    91 #define TX_HEAP_SWP_USED_BLOCKS     1191
    92 #define TX_HEAP_SWP_USED_BLOCKS_VAL 1192
    93 #define TX_HEAP_SWP_FREE_BLOCKS     1193
    94 #define TX_HEAP_SWP_FREE_BLOCKS_VAL 1194
     130/*
     131 * The MemInfo Page.
     132 */
     133#define DL_MEMINFO_PAGE             1600
     134#define GR_MEMINFO                  1601
    95135
    96 #define GR_W32K                     1200
    97 #define TX_W32K_VERSION             1201
    98 #define TX_W32K_VERSION_VAL         1202
    99 #define TX_W32K_BUILD_DATETIME      1203
    100 #define TX_W32K_BUILD_DATETIME_VAL  1204
    101 #define TX_W32K_SYMBOLFILE          1205
    102 #define TX_W32K_SYMBOLFILE_VAL      1206
    103 #define TX_W32K_KERNELBUILD         1207
    104 #define TX_W32K_KERNELBUILD_VAL     1208
     136#define GR_MEMINFO_SWAP             1610
     137#define TX_MEMINFO_SWAP_SIZE        1611
     138#define TX_MEMINFO_SWAP_AVAIL       1612
     139#define TX_MEMINFO_SWAP_USED        1613
     140#define TX_MEMINFO_SWAP_MINFREE     1614
     141#define TX_MEMINFO_SWAP_CFG_MINFREE 1615
     142#define TX_MEMINFO_SWAP_CFG_SIZE    1616
     143#define TX_MEMINFO_SWAP_BROKEN_DFS  1617
     144#define TX_MEMINFO_SWAP_GROW_FAILS  1618
     145#define TX_MEMINFO_SWAP_DFS_IN_MEMFILE 1619
    105146
    106 #define GR_LDRFIX                   1250
    107 #define CB_LDRFIX_DLLFIXES          1251
    108 #define CB_LDRFIX_EXEFIXES          1252
    109 #define CB_LDRFIX_FORCEPRELOAD      1253
     147#define GR_MEMINFO_PHYSPAGE         1640
     148#define TX_MEMINFO_PHYS_SIZE        1641
     149#define TX_MEMINFO_PHYS_AVAIL       1642
     150#define TX_MEMINFO_PHYS_USED        1643
     151#define TX_MEMINFO_PAGE_ENABLED     1651
     152#define TX_MEMINFO_PAGE_FAULTS      1652
     153#define TX_MEMINFO_PAGE_FAULTS_ACTIVE 1653
     154#define TX_MEMINFO_PAGE_PHYSPAGES   1654
     155#define TX_MEMINFO_PAGE_RESPAGES    1655
     156#define TX_MEMINFO_PAGE_SWAPPAGES   1656
     157#define TX_MEMINFO_PAGE_DISCPAGES   1657
     158#define TX_MEMINFO_PAGE_DISCINMEM   1658
    110159
     160#define GR_MEMINFO_VM               1680
     161#define TX_MEMINFO_VM_ADDRESSLIMIT  1681
     162#define TX_MEMINFO_VM_SHARED_MIN    1682
     163#define TX_MEMINFO_VM_SHARED_MAX    1683
     164#define TX_MEMINFO_VM_PRIVATE_MAX   1684
     165#define TX_MEMINFO_VM_SYSTEM_MIN    1685
     166#define TX_MEMINFO_VM_SYSTEM_MAX    1686
     167#define TX_MEMINFO_VM_PRIVATE_HMAX  1687
     168#define TX_MEMINFO_VM_SHARED_HMIN   1688
     169#define TX_MEMINFO_VM_SHARED_HMAX   1689
  • trunk/src/win32k/utils/Win32kCC.c

    r5119 r5160  
    1 /* $Id: Win32kCC.c,v 1.12 2001-02-11 23:41:46 bird Exp $
     1/* $Id: Win32kCC.c,v 1.13 2001-02-17 20:25:44 bird Exp $
    22 *
    33 * Win32CC - Win32k Control Center.
     
    2222
    2323/*
     24 * Notebook page constants.
     25 */
     26#define W32KCCPG_STATUS         0
     27#define W32KCCPG_LOADERS        1
     28#define W32KCCPG_LOGGING        2
     29#define W32KCCPG_HEAPS          3
     30#define W32KCCPG_LDRFIX         4
     31#define W32KCCPG_MEMINFO        5
     32#define W32KCCPG_PAGES          (W32KCCPG_MEMINFO+1)
     33
     34
     35/*
    2436 * Include defines
    2537 */
     
    2739#define INCL_DOSFILEMGR
    2840#define INCL_DOSRESOURCES
     41#define INCL_DOSMISC
     42
    2943#define INCL_WINERRORS
    3044#define INCL_WINDIALOGS
     
    3347#define INCL_WINBUTTONS
    3448#define INCL_WINWINDOWMGR
    35 #define INCL_DOSMISC
     49#define INCL_WINSTDBOOK
     50#define INCL_WINSYS
     51#define INCL_WINTIMER
     52
     53#define INCL_WINACCELERATORS
     54#define INCL_WINFRAMEMGR
     55
     56#define INCL_GPIPRIMITIVES
     57#define INCL_GPILCIDS
     58
     59
    3660
    3761/*******************************************************************************
     
    5377
    5478
    55 
    5679/*******************************************************************************
    5780*   Structures and Typedefs                                                    *
    5881*******************************************************************************/
    59 typedef struct _WIN32KCC
     82typedef struct _Win32kCCPage
    6083{
     84    ULONG   ulId;
    6185    HWND    hwnd;
    62     HAB     hab;
    63     BOOL    fDirty;
    64 
    65     K32OPTIONS Options;
    66     K32OPTIONS NewOptions;
    67     K32STATUS  Status;
     86} WIN32KCCPAGE, *PWIN32KCCPAGE;
     87
     88typedef struct _Win32kCC
     89{
     90    HWND            hwnd;
     91    HWND            hwndNtbk;
     92    HAB             hab;
     93    BOOL            fDirty;
     94
     95    K32OPTIONS      Options;
     96    K32OPTIONS      NewOptions;
     97    K32STATUS       Status;
     98
     99    ULONG           idMemTimer;         /* The Timer ID of the MemInfo Refresh Timer. */
     100    K32SYSTEMMEMINFO MemInfo;           /* Current displayed meminfo. */
     101
     102    WIN32KCCPAGE    aPages[W32KCCPG_PAGES]; /* Array containing generic page info. */
    68103
    69104} WIN32KCC, *PWIN32KCC;
     
    78113                                         * WM_QUITs.
    79114                                         */
    80 
     115BOOL    fOldNtbk;                       /* Set if we must use the old notebook
     116                                         * style.
     117                                         */
    81118
    82119/*******************************************************************************
    83120*   Internal Functions                                                         *
    84121*******************************************************************************/
    85 MRESULT EXPENTRY    Win32kCCDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
     122MRESULT EXPENTRY    Win32kCCDlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
     123
     124MRESULT EXPENTRY    LoadersDlgProc  (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
     125MRESULT EXPENTRY    LoggingDlgProc  (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
     126MRESULT EXPENTRY    StatusDlgProc   (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
     127MRESULT EXPENTRY    HeapsDlgProc    (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
     128MRESULT EXPENTRY    LdrFixDlgProc   (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
     129MRESULT EXPENTRY    MemInfoDlgProc  (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
     130
     131MRESULT EXPENTRY    NtbkDefPageDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
     132
     133BOOL                SetDlgItemTextF(HWND hwndDlg, ULONG idItem, PSZ pszFormat, ...);
    86134ULONG               ShowMessage(HWND hwndOwner, int id, ULONG flStyle);
    87135BOOL                Complain(HWND hwndOwner, int id, ...);
     
    108156    ULONG   rc = 0;
    109157    HWND    hwnd;
     158    ULONG   aulVer[2];
    110159
    111160    /*
     
    146195
    147196    /*
     197     * Check version and set fOldNtbk accordingly.
     198     */
     199    fOldNtbk = (DosQuerySysInfo(QSV_VERSION_MAJOR, QSV_VERSION_MINOR, &aulVer, sizeof(aulVer))
     200                || (aulVer[1] <= 20 && aulVer[0] < 40));
     201
     202    /*
    148203     * Load the dialog.
    149204     */
     
    151206                      Win32kCCDlgProc,
    152207                      NULLHANDLE,
    153                       DL_WIN32KCC,
     208                      fOldNtbk ? DL_WIN32KCC_OLD : DL_WIN32KCC,
    154209                      NULL);
    155210
     
    193248
    194249/**
    195  * Dialog procedure for the DL_WIN32KCC dialog.
     250 * Dialog procedure for the DL_WIN32KCC notebook dialog.
    196251 * (See PMREF for the general specifications of this function.)
    197252 */
     
    199254{
    200255    PWIN32KCC   pThis;
     256    int         i;
    201257
    202258
     
    218274    {
    219275        /*
    220          * Sets the controls according to the data from win32k.
     276         * Initialize the controls and trigger a setcontrol event.
    221277         *
    222278         * mr:  Focus changed or not.
     
    226282        case WM_INITDLG:
    227283        {
    228 
    229             /*
    230              * Initiate controls (ie. behaviour not data).
    231              *  - Ranges of the info level spinbuttons.
    232              *  - Max length of the max heap size entry fields.
    233              */
    234             WinSendDlgItemMsg(hwnd, SB_LDR_PE_INFOLEVEL, SPBM_SETLIMITS, (MPARAM)4, (MPARAM)0);
    235             WinSendDlgItemMsg(hwnd, SB_LDR_ELF_INFOLEVEL, SPBM_SETLIMITS, (MPARAM)4, (MPARAM)0);
    236 
    237             WinSendDlgItemMsg(hwnd, SB_HEAP_RES_MAX, SPBM_SETLIMITS, (MPARAM)32678, (MPARAM)128);
    238             WinSendDlgItemMsg(hwnd, SB_HEAP_SWP_MAX, SPBM_SETLIMITS, (MPARAM)32678, (MPARAM)128);
    239 
     284            static struct _NtbkPage
     285            {
     286                PFNWP   pfnDlgProc;
     287                ULONG   idDlg;
     288                ULONG   idPage;
     289            }   aPages[W32KCCPG_PAGES] =
     290            {
     291                { StatusDlgProc ,  PG_WIN32K_INFO_PAGE, W32KCCPG_STATUS },
     292                { LoadersDlgProc,  DL_LOADERS_PAGE,     W32KCCPG_LOADERS},
     293                { LoggingDlgProc,  DL_LOGGING_PAGE,     W32KCCPG_LOGGING},
     294                { HeapsDlgProc  ,  DL_HEAPS_PAGE,       W32KCCPG_HEAPS  },
     295                { LdrFixDlgProc ,  DL_LDRFIX_PAGE,      W32KCCPG_LDRFIX },
     296                { MemInfoDlgProc , DL_MEMINFO_PAGE,     W32KCCPG_MEMINFO }
     297            };
     298            CHAR            szTabText[128];
     299            PDLGTEMPLATE    pdlgt;
     300            APIRET          rc;
     301            RECTL           rectl;
     302            SWP             swp;
     303            SWP             swp2;
    240304
    241305            /*
    242306             * Init and set instance data.
    243307             */
    244             pThis = malloc(sizeof(*pThis));
     308            pThis = calloc(sizeof(*pThis), 1);
    245309            if (pThis == NULL)
    246310            {
     
    252316            pThis->hwnd = hwnd;
    253317            pThis->hab = WinQueryAnchorBlock(hwnd);
     318            pThis->hwndNtbk = WinWindowFromID(hwnd, DL_WIN32KCC_NTBK);
    254319            if (!WinSetWindowPtr(hwnd, QWL_USER, pThis))
    255320            {
    256321                /* complain, dismiss and return. */
    257                 Complain(hwnd, IDS_ERR_SET_INSTACEDATA,
     322                Complain(hwnd, IDS_ERR_SET_INSTANCEDATA,
    258323                         WinGetLastError(pThis->hab),
    259324                         getLastErrorMsg(pThis->hab));
     
    263328                return FALSE;
    264329            }
     330
     331
     332            /*
     333             * Load and set accellerator table.
     334             */
     335            WinSetAccelTable(pThis->hab, WinLoadAccelTable(pThis->hab, NULLHANDLE, DL_WIN32KCC), hwnd);
     336
     337
     338            /*
     339             * Insert notebooks pages.
     340             */
     341            for (i = 0; i < W32KCCPG_PAGES; i++)
     342            {
     343                ULONG ulErrId = 0;
     344                ULONG iPage = aPages[i].idPage;
     345
     346                rc = DosGetResource(NULLHANDLE, RT_DIALOG, aPages[i].idDlg, (PPVOID)(void*)&pdlgt);
     347                if (rc)
     348                {
     349                    Complain(hwnd, IDS_ERR_FAILED_TO_LOAD_DLGT, aPages[i].idDlg, rc);
     350                    WinPostMsg(hwnd, WM_QUIT, NULL, NULL);
     351                    WinSendMsg(hwnd, WM_DESTROY, NULL, NULL);
     352                    return FALSE;
     353                }
     354
     355                pThis->aPages[iPage].hwnd =
     356                    (HWND)WinLoadDlg(hwnd, HWND_DESKTOP, aPages[i].pfnDlgProc,
     357                                     NULLHANDLE, aPages[i].idDlg, pThis);
     358                if (pThis->aPages[iPage].hwnd != NULLHANDLE)
     359                {
     360                    /*
     361                     * Resize the notebook according to the first page.
     362                     *  Get the size of the page we're inserting
     363                     *  Calc notebook size according to that page.
     364                     *  Resize the notebook controll.
     365                     *  Resize the dialog.
     366                     *  Recalc page rectangle.
     367                     */
     368                    if (i == 0)
     369                    {
     370                        WinQueryWindowPos(pThis->aPages[iPage].hwnd, &swp);
     371                        rectl.xLeft = rectl.yBottom = 0;
     372                        rectl.xRight = swp.cx;
     373                        rectl.yTop = swp.cy;
     374                        WinSendMsg(pThis->hwndNtbk, BKM_CALCPAGERECT, &rectl, (MPARAM)FALSE);
     375
     376                        WinQueryWindowPos(pThis->hwndNtbk, &swp);
     377                        WinSetWindowPos(pThis->hwndNtbk, NULLHANDLE,
     378                                        0, 0,
     379                                        rectl.xRight - rectl.xLeft,
     380                                        rectl.yTop - rectl.yBottom,
     381                                        SWP_SIZE);
     382
     383                        WinQueryWindowPos(hwnd, &swp2);
     384                        WinSetWindowPos(hwnd, NULLHANDLE,
     385                                        0, 0,
     386                                        swp2.cx + (rectl.xRight - rectl.xLeft) - swp.cx,
     387                                        swp2.cy + (rectl.yTop - rectl.yBottom) - swp.cy,
     388                                        SWP_SIZE);
     389                    }
     390
     391                    /*
     392                     * Insert page.
     393                     */
     394                    pThis->aPages[iPage].ulId =
     395                        (ULONG)WinSendMsg(pThis->hwndNtbk, BKM_INSERTPAGE, NULL,
     396                                          MPFROM2SHORT(BKA_MAJOR | BKA_AUTOPAGESIZE, BKA_LAST));
     397                    if (pThis->aPages[iPage].ulId != 0)
     398                    {
     399                        /*
     400                         * Place the dialog into the page.
     401                         */
     402                        if (WinSendMsg(pThis->hwndNtbk, BKM_SETPAGEWINDOWHWND,
     403                                       (MPARAM)pThis->aPages[iPage].ulId, (MPARAM)pThis->aPages[iPage].hwnd))
     404                        {
     405                            /*
     406                             * Set tab text - use the title of the dialog.
     407                             */
     408                            szTabText[0] = '\0';
     409                            if (   pdlgt != NULL && pdlgt->adlgti[0].cchText != 0
     410                                && pdlgt->adlgti[0].offText != 0xFFFF && pdlgt->adlgti[0].offText != 0)
     411                                strncat(szTabText, (char*)((unsigned)(pdlgt) + pdlgt->adlgti[0].offText), pdlgt->adlgti[0].cchText);
     412                            WinSendMsg(pThis->hwndNtbk, BKM_SETTABTEXT, (MPARAM)pThis->aPages[iPage].ulId, &szTabText[0]);
     413                        }
     414                        else
     415                            ulErrId = IDS_ERR_ADD_NTBK_PAGE_SET;
     416                    }
     417                    else
     418                        ulErrId = IDS_ERR_ADD_NTBK_PAGE_INSERT;
     419                }
     420                else
     421                    ulErrId = IDS_ERR_ADD_NTBK_PAGE_LOAD;
     422
     423                /* Check for error */
     424                if (ulErrId)
     425                {
     426                    Complain(hwnd, ulErrId, aPages[i].idDlg,  WinGetLastError(pThis->hab), getLastErrorMsg(pThis->hab));
     427                    WinPostMsg(hwnd, WM_QUIT, NULL, NULL);
     428                    WinSendMsg(hwnd, WM_DESTROY, NULL, NULL);
     429                    return FALSE;
     430                }
     431            }
     432
     433            if (fOldNtbk)
     434            {
     435                POINTL      ptl;
     436                FONTMETRICS fm;
     437
     438                /*
     439                 * If it's an old style dialog we'll have to resize the tabs.
     440                 *      Hackish!!! Seems like I don't do this right!
     441                 */
     442                for (i = 0, ptl.x = 7, ptl.y = 7; i < W32KCCPG_PAGES; i++)
     443                {
     444                    BOOKTEXT    booktxt = {&szTabText[0], sizeof(szTabText)};
     445                    if (pThis->aPages[i].hwnd == NULLHANDLE) continue;
     446
     447                    if (WinSendMsg(pThis->hwndNtbk, BKM_QUERYTABTEXT, (MPARAM)pThis->aPages[i].ulId, &booktxt))
     448                    {
     449                        POINTL aptl[TXTBOX_COUNT];
     450                        if (GpiQueryTextBox(WinGetPS(pThis->hwndNtbk), strlen(booktxt.pString)+1, booktxt.pString, TXTBOX_COUNT, aptl))
     451                        {
     452                            if (ptl.x < abs(aptl[TXTBOX_BOTTOMRIGHT].x - aptl[TXTBOX_BOTTOMLEFT].x))
     453                                ptl.x = abs(aptl[TXTBOX_BOTTOMRIGHT].x - aptl[TXTBOX_BOTTOMLEFT].x);
     454                        }
     455                    }
     456                }
     457                if (GpiQueryFontMetrics(WinGetPS(pThis->hwndNtbk), sizeof(fm), &fm))
     458                    ptl.y = fm.lXHeight + fm.lEmHeight;
     459
     460
     461                /*
     462                 * Before we resize anything, we'll have to get the size of a page.
     463                 * Change the tab size. This may effect the notebook page size.
     464                 * Recalc new notebook size using old page size.
     465                 * Addjust dialog window.
     466                 * Addjust notebook control.
     467                 */
     468                WinQueryWindowPos(pThis->aPages[aPages[0].idPage].hwnd, &swp);
     469
     470                WinSendMsg(pThis->hwndNtbk, BKM_SETDIMENSIONS, MPFROM2SHORT(ptl.x, ptl.y), (MPARAM)BKA_MAJORTAB);
     471
     472                rectl.xLeft = swp.x;
     473                rectl.yBottom = swp.y;
     474                rectl.xRight = swp.cx - swp.x;
     475                rectl.yTop = swp.cy - swp.y;
     476                WinSendMsg(pThis->hwndNtbk, BKM_CALCPAGERECT, &rectl, (MPARAM)FALSE);
     477                WinQueryWindowPos(hwnd, &swp);
     478                WinQueryWindowPos(pThis->hwndNtbk, &swp2);
     479                WinSetWindowPos(hwnd, NULLHANDLE, 0, 0,
     480                                swp.cx + rectl.xRight - rectl.xLeft - swp2.cx,
     481                                swp.cy + rectl.yTop - rectl.yBottom - swp2.cy,
     482                                SWP_SIZE);
     483                WinSetWindowPos(pThis->hwndNtbk, NULLHANDLE, 0, 0,
     484                                rectl.xRight - rectl.xLeft,
     485                                rectl.yTop - rectl.yBottom,
     486                                SWP_SIZE);
     487
     488                /*
     489                 * Set Status text background color to dialog background color.
     490                 */
     491                WinSendMsg(pThis->hwndNtbk, BKM_SETNOTEBOOKCOLORS,
     492                           (MPARAM)SYSCLR_DIALOGBACKGROUND,
     493                           (MPARAM)BKA_BACKGROUNDPAGECOLORINDEX);
     494            }
     495
    265496
    266497            /*
     
    454685            WinSendMsg(hwnd, WM_COMMAND,
    455686                       MPFROMSHORT(DID_OK), MPFROM2SHORT(CMDSRC_MENU, FALSE));
    456             break;
     687            return NULL;
    457688
    458689
    459690        /*
    460691         * Window is destroyed (last message which ever should reach us!)
     692         *  -Free acceltable if present.
    461693         *  -Free instance data
    462694         *  -Set the instance data pointer to NULL (just in case).
     
    464696        case WM_DESTROY:
    465697        {
     698            HACCEL haccel = WinQueryAccelTable(pThis->hab, hwnd);
     699            if (haccel)
     700                WinDestroyAccelTable(haccel);
    466701            free(pThis);
    467702            WinSetWindowPtr(hwnd, QWL_USER, NULL);
     
    481716        {
    482717            APIRET  rc;
    483             CHAR    szNumber[32];
    484             CHAR    szBuffer[100];
    485 
    486718
    487719            /*
     
    503735
    504736            /*
    505              * Set the controls.
     737             * Update the individual pages.
    506738             */
    507             /* win32k */
    508             sprintf(szBuffer, "%d.%d", 0, pThis->Status.ulVersion);
    509             WinSetDlgItemText(hwnd, TX_W32K_VERSION_VAL,        szBuffer);
    510             sprintf(szBuffer, "%s %s", pThis->Status.szBuildTime, pThis->Status.szBuildDate);
    511             WinSetDlgItemText(hwnd, TX_W32K_BUILD_DATETIME_VAL, szBuffer);
    512             WinSetDlgItemText(hwnd, TX_W32K_SYMBOLFILE_VAL,     pThis->Status.szSymFile);
    513             sprintf(szBuffer, "%d - ", pThis->Status.ulBuild);
    514             if (GetFixpackDesc(pThis->Status.ulBuild, pThis->Status.fKernel, szBuffer + strlen(szBuffer)))
    515                 sprintf(szBuffer, "%d", pThis->Status.ulBuild);
    516             WinSetDlgItemText(hwnd, TX_W32K_KERNELBUILD_VAL,    szBuffer);
    517 
    518             /* logging */
    519             WinSendDlgItemMsg(hwnd, CB_LOGGING_ENABLED,     BM_SETCHECK,    (MPARAM)(pThis->Options.fLogging),                  NULL);
    520             WinSendDlgItemMsg(hwnd, RB_LOGGING_COM1,        BM_SETCHECK,    (MPARAM)(pThis->Options.usCom == 0x3f8),            NULL);
    521             WinSendDlgItemMsg(hwnd, RB_LOGGING_COM2,        BM_SETCHECK,    (MPARAM)(pThis->Options.usCom == 0x2f8),            NULL);
    522             WinSendDlgItemMsg(hwnd, RB_LOGGING_COM3,        BM_SETCHECK,    (MPARAM)(pThis->Options.usCom == 0x3e8),            NULL);
    523             WinSendDlgItemMsg(hwnd, RB_LOGGING_COM4,        BM_SETCHECK,    (MPARAM)(pThis->Options.usCom == 0x2e8),            NULL);
    524 
    525             /* loaders */
     739            for (i = 0; i < W32KCCPG_PAGES; i++)
     740            {
     741                if (pThis->aPages[i].hwnd != NULLHANDLE)
     742                    WinSendMsg(pThis->aPages[i].hwnd, msg, mp1, mp2);
     743            }
     744
     745            /* Since all fields are update now - we can't be dirty any longer. */
     746            pThis->fDirty = FALSE;
     747            return NULL;
     748        }
     749
     750
     751        /*
     752         * Validate data in the controls. Complains accoring to mp1.
     753         * Put the data into the win32k option struct.
     754         *
     755         * mr:  Valid indicator.
     756         *      TRUE:   Valid data.
     757         *      FALSE:  Not valid data.
     758         * mp1: BOOL fComplain.
     759         *      TRUE:   Do complain about errors. The pThis->Options struct
     760         *              is updated on successful return.
     761         *      FALSE:  Do not complain about errors, and don't update the
     762         *              pThis->Options struct.
     763         * mp2: reserved.
     764         */
     765        case WM_QUERYCONTROLS:
     766        {
     767            /*
     768             * Init temporary option struct.
     769             */
     770            memset(&pThis->NewOptions, 0, sizeof(K32OPTIONS));
     771            pThis->NewOptions.cb = sizeof(K32OPTIONS);
     772
     773            /*
     774             * Query the individual pages.
     775             */
     776            for (i = 0; i < W32KCCPG_PAGES; i++)
     777            {
     778                if (pThis->aPages[i].hwnd != NULLHANDLE)
     779                if (!WinSendMsg(pThis->aPages[i].hwnd, msg, mp1, mp2))
     780                {
     781                    WinSendMsg(pThis->hwndNtbk, BKM_TURNTOPAGE, (MPARAM)pThis->aPages[i].ulId, NULL);
     782                    return (MPARAM)FALSE;
     783                }
     784            }
     785
     786            /*
     787             * Check if there is any change and set the fDirty flag accordingly.
     788             */
     789            pThis->fDirty = memcmp(&pThis->NewOptions, &pThis->Options, sizeof(K32OPTIONS)) != 0;
     790            return (MPARAM)TRUE;
     791        }
     792
     793        case WM_TRANSLATEACCEL:
     794        {
     795            break;
     796        }
     797    }
     798
     799    /*
     800     * Return thru the default dialog procedure.
     801     */
     802    return WinDefDlgProc(hwnd, msg, mp1, mp2);
     803}
     804
     805
     806/**
     807 * Dialog procedure for the DL_ dialog.
     808 * (See PMREF for the general specifications of this function.)
     809 */
     810MRESULT EXPENTRY    LoadersDlgProc  (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     811{
     812    PWIN32KCC   pThis;
     813
     814
     815    /*
     816     * Get instance data pointer (pThis).
     817     */
     818    if (msg != WM_INITDLG)
     819    {
     820        pThis = (PWIN32KCC)WinQueryWindowPtr(hwnd, QWL_USER);
     821        if (pThis == NULL)
     822            return WinDefDlgProc(hwnd, msg, mp1, mp2);
     823    }
     824
     825
     826    /*
     827     * Message switch.
     828     */
     829    switch (msg)
     830    {
     831        /*
     832         * Initialize controls.
     833         *
     834         * mr:  Focus changed or not.
     835         * mp1: hwnd of dialog
     836         * mp2: (user data) (NULL)
     837         */
     838        case WM_INITDLG:
     839        {
     840            /*
     841             * Initiate controls (ie. behaviour not data).
     842             *  - Ranges of the info level spinbuttons.
     843             */
     844            WinSendDlgItemMsg(hwnd, SB_LDR_PE_INFOLEVEL, SPBM_SETLIMITS, (MPARAM)4, (MPARAM)0);
     845            WinSendDlgItemMsg(hwnd, SB_LDR_ELF_INFOLEVEL, SPBM_SETLIMITS, (MPARAM)4, (MPARAM)0);
     846            break;
     847        }
     848
     849
     850        /*
     851         * Gets data from win32k.
     852         * Sets the controls according to the data from win32k.
     853         *
     854         * mr:  reserved
     855         * mp1: reserved
     856         * mp2: reserved
     857         */
     858        case WM_SETCONTROLS:
     859        {
     860            CHAR    szNumber[32];
     861
    526862            WinSendDlgItemMsg(hwnd, CB_LDR_DISABLE_ALL,     BM_SETCHECK,    (MPARAM)(pThis->Options.fNoLoader),                  NULL);
    527863            /* PE */
     
    545881            /* REXX Scripts */
    546882            WinSendDlgItemMsg(hwnd, CB_LDR_REXX,            BM_SETCHECK,    (MPARAM)(pThis->Options.fREXXScript),               NULL);
    547 
    548             /* OS/2 Loader Fixes */
    549             WinSendDlgItemMsg(hwnd, CB_LDRFIX_DLLFIXES,     BM_SETCHECK,    (MPARAM)(pThis->Options.fDllFixes),                 NULL);
    550             WinSendDlgItemMsg(hwnd, CB_LDRFIX_FORCEPRELOAD, BM_SETCHECK,    (MPARAM)(pThis->Options.fForcePreload),             NULL);
    551 
    552             /* heaps */
    553             /* Resident */
    554             WinSendDlgItemMsg(hwnd, SB_HEAP_RES_MAX,        SPBM_SETCURRENTVALUE, (MPARAM)(pThis->Options.cbResHeapMax / 1024), NULL);
    555             sprintf(szNumber, "%d", pThis->Status.cbResHeapInit / 1024);
    556             WinSetDlgItemText(hwnd, TX_HEAP_RES_INIT_VAL,   szNumber);
    557             sprintf(szNumber, "%d", pThis->Status.cbResHeapSize / 1024);
    558             WinSetDlgItemText(hwnd, TX_HEAP_RES_SIZE_VAL,   szNumber);
    559             sprintf(szNumber, "%d", pThis->Status.cbResHeapUsed / 1024);
    560             WinSetDlgItemText(hwnd, TX_HEAP_RES_USED_VAL,   szNumber);
    561             sprintf(szNumber, "%d", pThis->Status.cbResHeapFree / 1024);
    562             WinSetDlgItemText(hwnd, TX_HEAP_RES_FREE_VAL,   szNumber);
    563             sprintf(szNumber, "%d", pThis->Status.cResBlocksUsed);
    564             WinSetDlgItemText(hwnd, TX_HEAP_RES_USED_BLOCKS_VAL,   szNumber);
    565             sprintf(szNumber, "%d", pThis->Status.cResBlocksFree);
    566             WinSetDlgItemText(hwnd, TX_HEAP_RES_FREE_BLOCKS_VAL,   szNumber);
    567             /* Swappable */
    568             WinSendDlgItemMsg(hwnd, SB_HEAP_SWP_MAX,        SPBM_SETCURRENTVALUE, (MPARAM)(pThis->Options.cbSwpHeapMax / 1024), NULL);
    569             sprintf(szNumber, "%d", pThis->Status.cbSwpHeapInit / 1024);
    570             WinSetDlgItemText(hwnd, TX_HEAP_SWP_INIT_VAL,   szNumber);
    571             sprintf(szNumber, "%d", pThis->Status.cbSwpHeapSize / 1024);
    572             WinSetDlgItemText(hwnd, TX_HEAP_SWP_SIZE_VAL,   szNumber);
    573             sprintf(szNumber, "%d", pThis->Status.cbSwpHeapUsed / 1024);
    574             WinSetDlgItemText(hwnd, TX_HEAP_SWP_USED_VAL,   szNumber);
    575             sprintf(szNumber, "%d", pThis->Status.cbSwpHeapFree / 1024);
    576             WinSetDlgItemText(hwnd, TX_HEAP_SWP_FREE_VAL,   szNumber);
    577             sprintf(szNumber, "%d", pThis->Status.cSwpBlocksUsed);
    578             WinSetDlgItemText(hwnd, TX_HEAP_SWP_USED_BLOCKS_VAL,   szNumber);
    579             sprintf(szNumber, "%d", pThis->Status.cSwpBlocksFree);
    580             WinSetDlgItemText(hwnd, TX_HEAP_SWP_FREE_BLOCKS_VAL,   szNumber);
    581 
    582             pThis->fDirty = FALSE;
    583883            return NULL;
    584884        }
     
    601901        case WM_QUERYCONTROLS:
    602902        {
    603             BOOL        fComplain = (BOOL)mp1;
    604             ULONG       ul;
    605 
    606             /*
    607              * Init temporary option struct.
    608              */
    609             memset(&pThis->NewOptions, 0, sizeof(K32OPTIONS));
    610             pThis->NewOptions.cb = sizeof(K32OPTIONS);
    611 
    612             /*
    613              * Logging.
    614              */
    615             pThis->NewOptions.fLogging = WinSendDlgItemMsg(hwnd, CB_LOGGING_ENABLED, BM_QUERYCHECK, NULL, NULL) != 0;
    616             if (WinSendDlgItemMsg(hwnd, RB_LOGGING_COM1, BM_QUERYCHECK, NULL, NULL))
    617                 pThis->NewOptions.usCom = 0x3f8;
    618             else if (WinSendDlgItemMsg(hwnd, RB_LOGGING_COM2, BM_QUERYCHECK, NULL, NULL))
    619                 pThis->NewOptions.usCom = 0x2f8;
    620             else if (WinSendDlgItemMsg(hwnd, RB_LOGGING_COM3, BM_QUERYCHECK, NULL, NULL))
    621                 pThis->NewOptions.usCom = 0x3e8;
    622             else if (WinSendDlgItemMsg(hwnd, RB_LOGGING_COM4, BM_QUERYCHECK, NULL, NULL))
    623                 pThis->NewOptions.usCom = 0x2e8;
    624             else
    625             {
    626                 if (fComplain)
    627                     Complain(hwnd, IDS_ERR_NO_COM_RADIOBUTTON);
    628                 return (MPARAM)FALSE;
    629             }
    630 
    631             /*
    632              * Loaders
    633              */
     903            BOOL    fComplain = (BOOL)mp1;
     904            ULONG   ul;
     905
    634906            pThis->NewOptions.fNoLoader = WinSendDlgItemMsg(hwnd, CB_LDR_DISABLE_ALL, BM_QUERYCHECK, NULL, NULL) != 0;
    635907            /* PE */
     
    684956            /* REXX Scripts */
    685957            pThis->NewOptions.fREXXScript = WinSendDlgItemMsg(hwnd, CB_LDR_REXX, BM_QUERYCHECK, NULL, NULL) != 0;
     958            return (MRESULT)TRUE;
     959        }
     960    }
     961
     962    return NtbkDefPageDlgProc(hwnd, msg, mp1, mp2);
     963}
     964
     965
     966/**
     967 * Dialog procedure for the DL_ dialog.
     968 * (See PMREF for the general specifications of this function.)
     969 */
     970MRESULT EXPENTRY    LoggingDlgProc  (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     971{
     972    PWIN32KCC   pThis;
     973
     974
     975    /*
     976     * Get instance data pointer (pThis).
     977     */
     978    if (msg != WM_INITDLG)
     979    {
     980        pThis = (PWIN32KCC)WinQueryWindowPtr(hwnd, QWL_USER);
     981        if (pThis == NULL)
     982            return WinDefDlgProc(hwnd, msg, mp1, mp2);
     983    }
     984
     985
     986    /*
     987     * Message switch.
     988     */
     989    switch (msg)
     990    {
     991        /*
     992         * Gets data from win32k.
     993         * Sets the controls according to the data from win32k.
     994         *
     995         * mr:  reserved
     996         * mp1: reserved
     997         * mp2: reserved
     998         */
     999        case WM_SETCONTROLS:
     1000        {
     1001            WinSendDlgItemMsg(hwnd, CB_LOGGING_ENABLED,     BM_SETCHECK,    (MPARAM)(pThis->Options.fLogging),                  NULL);
     1002            WinSendDlgItemMsg(hwnd, RB_LOGGING_COM1,        BM_SETCHECK,    (MPARAM)(pThis->Options.usCom == 0x3f8),            NULL);
     1003            WinSendDlgItemMsg(hwnd, RB_LOGGING_COM2,        BM_SETCHECK,    (MPARAM)(pThis->Options.usCom == 0x2f8),            NULL);
     1004            WinSendDlgItemMsg(hwnd, RB_LOGGING_COM3,        BM_SETCHECK,    (MPARAM)(pThis->Options.usCom == 0x3e8),            NULL);
     1005            WinSendDlgItemMsg(hwnd, RB_LOGGING_COM4,        BM_SETCHECK,    (MPARAM)(pThis->Options.usCom == 0x2e8),            NULL);
     1006            return NULL;
     1007        }
     1008
     1009
     1010        /*
     1011         * Validate data in the controls. Complains accoring to mp1.
     1012         * Put the data into the win32k option struct.
     1013         *
     1014         * mr:  Valid indicator.
     1015         *      TRUE:   Valid data.
     1016         *      FALSE:  Not valid data.
     1017         * mp1: BOOL fComplain.
     1018         *      TRUE:   Do complain about errors. The pThis->Options struct
     1019         *              is updated on successful return.
     1020         *      FALSE:  Do not complain about errors, and don't update the
     1021         *              pThis->Options struct.
     1022         * mp2: reserved.
     1023         */
     1024        case WM_QUERYCONTROLS:
     1025        {
     1026            BOOL    fComplain = (BOOL)mp1;
     1027
     1028            pThis->NewOptions.fLogging = WinSendDlgItemMsg(hwnd, CB_LOGGING_ENABLED, BM_QUERYCHECK, NULL, NULL) != 0;
     1029            if (WinSendDlgItemMsg(hwnd, RB_LOGGING_COM1, BM_QUERYCHECK, NULL, NULL))
     1030                pThis->NewOptions.usCom = 0x3f8;
     1031            else if (WinSendDlgItemMsg(hwnd, RB_LOGGING_COM2, BM_QUERYCHECK, NULL, NULL))
     1032                pThis->NewOptions.usCom = 0x2f8;
     1033            else if (WinSendDlgItemMsg(hwnd, RB_LOGGING_COM3, BM_QUERYCHECK, NULL, NULL))
     1034                pThis->NewOptions.usCom = 0x3e8;
     1035            else if (WinSendDlgItemMsg(hwnd, RB_LOGGING_COM4, BM_QUERYCHECK, NULL, NULL))
     1036                pThis->NewOptions.usCom = 0x2e8;
     1037            else
     1038            {
     1039                if (fComplain)
     1040                    Complain(hwnd, IDS_ERR_NO_COM_RADIOBUTTON);
     1041                return (MPARAM)FALSE;
     1042            }
     1043            return (MRESULT)TRUE;
     1044        }
     1045    }
     1046
     1047    return NtbkDefPageDlgProc(hwnd, msg, mp1, mp2);
     1048}
     1049
     1050
     1051/**
     1052 * Dialog procedure for the DL_ dialog.
     1053 * (See PMREF for the general specifications of this function.)
     1054 */
     1055MRESULT EXPENTRY    StatusDlgProc   (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     1056{
     1057    PWIN32KCC   pThis;
     1058
     1059    /*
     1060     * Get instance data pointer (pThis).
     1061     */
     1062    if (msg != WM_INITDLG)
     1063    {
     1064        pThis = (PWIN32KCC)WinQueryWindowPtr(hwnd, QWL_USER);
     1065        if (pThis == NULL)
     1066            return WinDefDlgProc(hwnd, msg, mp1, mp2);
     1067    }
     1068
     1069
     1070    /*
     1071     * Message switch.
     1072     */
     1073    switch (msg)
     1074    {
     1075        /*
     1076         * Gets data from win32k.
     1077         * Sets the controls according to the data from win32k.
     1078         *
     1079         * mr:  reserved
     1080         * mp1: reserved
     1081         * mp2: reserved
     1082         */
     1083        case WM_SETCONTROLS:
     1084        {
     1085            CHAR    szBuffer[100];
    6861086
    6871087            /*
    688              * OS/2 Loader Fixes.
     1088             * Set the controls
    6891089             */
    690             pThis->NewOptions.fDllFixes = WinSendDlgItemMsg(hwnd, CB_LDRFIX_DLLFIXES, BM_QUERYCHECK, NULL, NULL) != 0;
    691             pThis->NewOptions.fForcePreload = WinSendDlgItemMsg(hwnd, CB_LDRFIX_FORCEPRELOAD, BM_QUERYCHECK, NULL, NULL) != 0;
    692 
     1090            sprintf(szBuffer, "%d.%d", 0, pThis->Status.ulVersion);
     1091            WinSetDlgItemText(hwnd, TX_W32K_VERSION_VAL,        szBuffer);
     1092            sprintf(szBuffer, "%s %s", pThis->Status.szBuildTime, pThis->Status.szBuildDate);
     1093            WinSetDlgItemText(hwnd, TX_W32K_BUILD_DATETIME_VAL, szBuffer);
     1094            WinSetDlgItemText(hwnd, TX_W32K_SYMBOLFILE_VAL,     pThis->Status.szSymFile);
     1095            sprintf(szBuffer, "%d - ", pThis->Status.ulBuild);
     1096            if (GetFixpackDesc(pThis->Status.ulBuild, pThis->Status.fKernel, szBuffer + strlen(szBuffer)))
     1097                sprintf(szBuffer, "%d", pThis->Status.ulBuild);
     1098            WinSetDlgItemText(hwnd, TX_W32K_KERNELBUILD_VAL,    szBuffer);
     1099            return NULL;
     1100        }
     1101    }
     1102
     1103    return NtbkDefPageDlgProc(hwnd, msg, mp1, mp2);
     1104}
     1105
     1106/**
     1107 * Dialog procedure for the DL_ dialog.
     1108 * (See PMREF for the general specifications of this function.)
     1109 */
     1110MRESULT EXPENTRY    HeapsDlgProc    (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     1111{
     1112    PWIN32KCC   pThis;
     1113
     1114
     1115    /*
     1116     * Get instance data pointer (pThis).
     1117     */
     1118    if (msg != WM_INITDLG)
     1119    {
     1120        pThis = (PWIN32KCC)WinQueryWindowPtr(hwnd, QWL_USER);
     1121        if (pThis == NULL)
     1122            return WinDefDlgProc(hwnd, msg, mp1, mp2);
     1123    }
     1124
     1125
     1126    /*
     1127     * Message switch.
     1128     */
     1129    switch (msg)
     1130    {
     1131        /*
     1132         * Initialize controls.
     1133         *
     1134         * mr:  Focus changed or not.
     1135         * mp1: hwnd of dialog
     1136         * mp2: (user data) (NULL)
     1137         */
     1138        case WM_INITDLG:
     1139        {
    6931140            /*
    694              * Heaps
     1141             * Initiate controls (ie. behaviour not data).
     1142             *  - Max length of the max heap size entry fields.
    6951143             */
     1144            WinSendDlgItemMsg(hwnd, SB_HEAP_RES_MAX, SPBM_SETLIMITS, (MPARAM)32678, (MPARAM)128);
     1145            WinSendDlgItemMsg(hwnd, SB_HEAP_SWP_MAX, SPBM_SETLIMITS, (MPARAM)32678, (MPARAM)128);
     1146            break;
     1147        }
     1148
     1149
     1150        /*
     1151         * Gets data from win32k.
     1152         * Sets the controls according to the data from win32k.
     1153         *
     1154         * mr:  reserved
     1155         * mp1: reserved
     1156         * mp2: reserved
     1157         */
     1158        case WM_SETCONTROLS:
     1159        {
     1160            CHAR    szNumber[32];
     1161
     1162            /* Resident */
     1163            WinSendDlgItemMsg(hwnd, SB_HEAP_RES_MAX,        SPBM_SETCURRENTVALUE, (MPARAM)(pThis->Options.cbResHeapMax / 1024), NULL);
     1164            sprintf(szNumber, "%d", pThis->Status.cbResHeapInit / 1024);
     1165            WinSetDlgItemText(hwnd, TX_HEAP_RES_INIT_VAL,   szNumber);
     1166            sprintf(szNumber, "%d", pThis->Status.cbResHeapSize / 1024);
     1167            WinSetDlgItemText(hwnd, TX_HEAP_RES_SIZE_VAL,   szNumber);
     1168            sprintf(szNumber, "%d", pThis->Status.cbResHeapUsed / 1024);
     1169            WinSetDlgItemText(hwnd, TX_HEAP_RES_USED_VAL,   szNumber);
     1170            sprintf(szNumber, "%d", pThis->Status.cbResHeapFree / 1024);
     1171            WinSetDlgItemText(hwnd, TX_HEAP_RES_FREE_VAL,   szNumber);
     1172            sprintf(szNumber, "%d", pThis->Status.cResBlocksUsed);
     1173            WinSetDlgItemText(hwnd, TX_HEAP_RES_USED_BLOCKS_VAL,   szNumber);
     1174            sprintf(szNumber, "%d", pThis->Status.cResBlocksFree);
     1175            WinSetDlgItemText(hwnd, TX_HEAP_RES_FREE_BLOCKS_VAL,   szNumber);
     1176            /* Swappable */
     1177            WinSendDlgItemMsg(hwnd, SB_HEAP_SWP_MAX,        SPBM_SETCURRENTVALUE, (MPARAM)(pThis->Options.cbSwpHeapMax / 1024), NULL);
     1178            sprintf(szNumber, "%d", pThis->Status.cbSwpHeapInit / 1024);
     1179            WinSetDlgItemText(hwnd, TX_HEAP_SWP_INIT_VAL,   szNumber);
     1180            sprintf(szNumber, "%d", pThis->Status.cbSwpHeapSize / 1024);
     1181            WinSetDlgItemText(hwnd, TX_HEAP_SWP_SIZE_VAL,   szNumber);
     1182            sprintf(szNumber, "%d", pThis->Status.cbSwpHeapUsed / 1024);
     1183            WinSetDlgItemText(hwnd, TX_HEAP_SWP_USED_VAL,   szNumber);
     1184            sprintf(szNumber, "%d", pThis->Status.cbSwpHeapFree / 1024);
     1185            WinSetDlgItemText(hwnd, TX_HEAP_SWP_FREE_VAL,   szNumber);
     1186            sprintf(szNumber, "%d", pThis->Status.cSwpBlocksUsed);
     1187            WinSetDlgItemText(hwnd, TX_HEAP_SWP_USED_BLOCKS_VAL,   szNumber);
     1188            sprintf(szNumber, "%d", pThis->Status.cSwpBlocksFree);
     1189            WinSetDlgItemText(hwnd, TX_HEAP_SWP_FREE_BLOCKS_VAL,   szNumber);
     1190            return NULL;
     1191        }
     1192
     1193
     1194        /*
     1195         * Validate data in the controls. Complains accoring to mp1.
     1196         * Put the data into the win32k option struct.
     1197         *
     1198         * mr:  Valid indicator.
     1199         *      TRUE:   Valid data.
     1200         *      FALSE:  Not valid data.
     1201         * mp1: BOOL fComplain.
     1202         *      TRUE:   Do complain about errors. The pThis->Options struct
     1203         *              is updated on successful return.
     1204         *      FALSE:  Do not complain about errors, and don't update the
     1205         *              pThis->Options struct.
     1206         * mp2: reserved.
     1207         */
     1208        case WM_QUERYCONTROLS:
     1209        {
     1210            BOOL    fComplain = (BOOL)mp1;
     1211            ULONG   ul;
     1212
    6961213            /* Resident */
    6971214            if (!WinSendDlgItemMsg(hwnd, SB_HEAP_RES_MAX, SPBM_QUERYVALUE, (MPARAM)&ul, MPFROM2SHORT(0, SPBQ_UPDATEIFVALID)))
     
    7161233            }
    7171234            pThis->NewOptions.cbSwpHeapMax = ul*1024;
     1235            return (MRESULT)TRUE;
     1236        }
     1237    }
     1238
     1239    return NtbkDefPageDlgProc(hwnd, msg, mp1, mp2);
     1240}
     1241
     1242
     1243/**
     1244 * Dialog procedure for the DL_ dialog.
     1245 * (See PMREF for the general specifications of this function.)
     1246 */
     1247MRESULT EXPENTRY    LdrFixDlgProc   (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     1248{
     1249    PWIN32KCC   pThis;
     1250
     1251
     1252    /*
     1253     * Get instance data pointer (pThis).
     1254     */
     1255    if (msg != WM_INITDLG)
     1256    {
     1257        pThis = (PWIN32KCC)WinQueryWindowPtr(hwnd, QWL_USER);
     1258        if (pThis == NULL)
     1259            return WinDefDlgProc(hwnd, msg, mp1, mp2);
     1260    }
     1261
     1262
     1263    /*
     1264     * Message switch.
     1265     */
     1266    switch (msg)
     1267    {
     1268        /*
     1269         * Gets data from win32k.
     1270         * Sets the controls according to the data from win32k.
     1271         *
     1272         * mr:  reserved
     1273         * mp1: reserved
     1274         * mp2: reserved
     1275         */
     1276        case WM_SETCONTROLS:
     1277        {
     1278            WinSendDlgItemMsg(hwnd, CB_LDRFIX_DLLFIXES,     BM_SETCHECK,    (MPARAM)(pThis->Options.fDllFixes),                 NULL);
     1279            WinSendDlgItemMsg(hwnd, CB_LDRFIX_FORCEPRELOAD, BM_SETCHECK,    (MPARAM)(pThis->Options.fForcePreload),             NULL);
     1280            return NULL;
     1281        }
     1282
     1283
     1284        /*
     1285         * Validate data in the controls. Complains accoring to mp1.
     1286         * Put the data into the win32k option struct.
     1287         *
     1288         * mr:  Valid indicator.
     1289         *      TRUE:   Valid data.
     1290         *      FALSE:  Not valid data.
     1291         * mp1: BOOL fComplain.
     1292         *      TRUE:   Do complain about errors. The pThis->Options struct
     1293         *              is updated on successful return.
     1294         *      FALSE:  Do not complain about errors, and don't update the
     1295         *              pThis->Options struct.
     1296         * mp2: reserved.
     1297         */
     1298        case WM_QUERYCONTROLS:
     1299        {
     1300            pThis->NewOptions.fDllFixes = WinSendDlgItemMsg(hwnd, CB_LDRFIX_DLLFIXES, BM_QUERYCHECK, NULL, NULL) != 0;
     1301            pThis->NewOptions.fForcePreload = WinSendDlgItemMsg(hwnd, CB_LDRFIX_FORCEPRELOAD, BM_QUERYCHECK, NULL, NULL) != 0;
     1302            pThis->NewOptions.fExeFixes = pThis->Options.fExeFixes;
     1303            return (MRESULT)TRUE;
     1304        }
     1305    }
     1306
     1307    return NtbkDefPageDlgProc(hwnd, msg, mp1, mp2);
     1308}
     1309
     1310
     1311/**
     1312 * Dialog procedure for the DL_ dialog.
     1313 * (See PMREF for the general specifications of this function.)
     1314 */
     1315MRESULT EXPENTRY    MemInfoDlgProc  (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     1316{
     1317    PWIN32KCC   pThis;
     1318
     1319
     1320    /*
     1321     * Get instance data pointer (pThis).
     1322     */
     1323    if (msg != WM_INITDLG)
     1324    {
     1325        pThis = (PWIN32KCC)WinQueryWindowPtr(hwnd, QWL_USER);
     1326        if (pThis == NULL)
     1327            return WinDefDlgProc(hwnd, msg, mp1, mp2);
     1328    }
     1329
     1330
     1331    /*
     1332     * Message switch.
     1333     */
     1334    switch (msg)
     1335    {
     1336        /*
     1337         * Start timer.
     1338         *
     1339         * mr:  Focus changed or not.
     1340         * mp1: hwnd of dialog
     1341         * mp2: (user data) (pThis for notebook)
     1342         */
     1343        case WM_INITDLG:
     1344        {
     1345            pThis = (PWIN32KCC)mp2;
     1346            WinEnableWindow(WinWindowFromID(hwnd, TX_MEMINFO_PAGE_ENABLED), FALSE);
     1347            pThis->idMemTimer = WinStartTimer(pThis->hab, hwnd, 42, 1000);
     1348            if (!pThis->idMemTimer)
     1349                Complain(hwnd, IDS_ERR_TIMER_START, WinGetLastError(pThis->hab), getLastErrorMsg(pThis->hab));
     1350            memset(&pThis->MemInfo, -1, sizeof(pThis->MemInfo)); /* Force update of everything. */
     1351            break;                      /* not return, break thru the ntbk page default procedure. */
     1352        }
     1353
     1354
     1355        /*
     1356         * We've started a timer for refreshing the memory data.
     1357         *
     1358         * mr:  reserved
     1359         * mp1: Id of the timer which is ticking.
     1360         * mp2: reserved
     1361         */
     1362        case WM_TIMER:
     1363        {
     1364            if ((ULONG)mp1 != pThis->idMemTimer)
     1365                return NULL;
     1366
     1367            /* intented fallthru to WM_SETCONTROLS */
     1368        }
     1369
     1370
     1371        /*
     1372         * Save old data.
     1373         * Gets system meminfo data from win32k.
     1374         * Updated changed values.
     1375         * Update pThis with new meminfo.
     1376         *
     1377         * mr:  reserved
     1378         * mp1: reserved
     1379         * mp2: reserved
     1380         */
     1381        case WM_SETCONTROLS:
     1382        {
     1383            K32SYSTEMMEMINFO    MemInfo;
     1384            K32SYSTEMMEMINFO    OldMemInfo;
     1385            APIRET              rc;
     1386
     1387            OldMemInfo = pThis->MemInfo;
     1388            MemInfo.cb = sizeof(MemInfo);
     1389            MemInfo.flFlags = 0;
     1390            rc = W32kQuerySystemMemInfo(&MemInfo);
     1391            if (rc)
     1392            {
     1393                WinStopTimer(pThis->hab, hwnd, pThis->idMemTimer);
     1394                break;
     1395            }
     1396
     1397            if (MemInfo.cbSwapFileSize != OldMemInfo.cbSwapFileSize)
     1398                SetDlgItemTextF(hwnd, TX_MEMINFO_SWAP_SIZE       , "%d", MemInfo.cbSwapFileSize / 1024);
     1399            if (MemInfo.cbSwapFileAvail != OldMemInfo.cbSwapFileAvail)
     1400                SetDlgItemTextF(hwnd, TX_MEMINFO_SWAP_AVAIL      , "%d", MemInfo.cbSwapFileAvail / 1024);
     1401            if (MemInfo.cbSwapFileUsed != OldMemInfo.cbSwapFileUsed)
     1402                SetDlgItemTextF(hwnd, TX_MEMINFO_SWAP_USED       , "%d", MemInfo.cbSwapFileUsed / 1024);
     1403            if (MemInfo.cbSwapFileMinFree != OldMemInfo.cbSwapFileMinFree)
     1404                SetDlgItemTextF(hwnd, TX_MEMINFO_SWAP_MINFREE    , "%d", MemInfo.cbSwapFileMinFree / 1024);
     1405            if (MemInfo.cbSwapFileCFGMinFree != OldMemInfo.cbSwapFileCFGMinFree)
     1406                SetDlgItemTextF(hwnd, TX_MEMINFO_SWAP_CFG_MINFREE, "%d", MemInfo.cbSwapFileCFGMinFree / 1024);
     1407            if (MemInfo.cbSwapFileCFGSwapSize != OldMemInfo.cbSwapFileCFGSwapSize)
     1408                SetDlgItemTextF(hwnd, TX_MEMINFO_SWAP_CFG_SIZE   , "%d", MemInfo.cbSwapFileCFGSwapSize / 1024);
     1409            if (MemInfo.cSwapFileBrokenDF != OldMemInfo.cSwapFileBrokenDF)
     1410                SetDlgItemTextF(hwnd, TX_MEMINFO_SWAP_BROKEN_DFS , "%d", MemInfo.cSwapFileBrokenDF);
     1411            if (MemInfo.cSwapFileGrowFails != OldMemInfo.cSwapFileGrowFails)
     1412                SetDlgItemTextF(hwnd, TX_MEMINFO_SWAP_GROW_FAILS , "%d", MemInfo.cSwapFileGrowFails);
     1413            if (MemInfo.cSwapFileInMemFile != OldMemInfo.cSwapFileInMemFile)
     1414                SetDlgItemTextF(hwnd, TX_MEMINFO_SWAP_DFS_IN_MEMFILE, "%d", MemInfo.cSwapFileInMemFile);
     1415
     1416            if (MemInfo.cbPhysSize != OldMemInfo.cbPhysSize)
     1417                SetDlgItemTextF(hwnd, TX_MEMINFO_PHYS_SIZE , "%d", MemInfo.cbPhysSize / 1024);
     1418            if (MemInfo.cbPhysAvail != OldMemInfo.cbPhysAvail)
     1419                SetDlgItemTextF(hwnd, TX_MEMINFO_PHYS_AVAIL, "%d", MemInfo.cbPhysAvail / 1024);
     1420            if (MemInfo.cbPhysUsed != OldMemInfo.cbPhysUsed)
     1421                SetDlgItemTextF(hwnd, TX_MEMINFO_PHYS_USED , "%d", MemInfo.cbPhysUsed / 1024);
     1422            if (MemInfo.fPagingSwapEnabled != OldMemInfo.fPagingSwapEnabled)
     1423                WinSendDlgItemMsg(hwnd, TX_MEMINFO_PAGE_ENABLED, BM_SETCHECK, (MPARAM)MemInfo.fPagingSwapEnabled, NULL);
     1424            if (MemInfo.cPagingPageFaults != OldMemInfo.cPagingPageFaults)
     1425                SetDlgItemTextF(hwnd, TX_MEMINFO_PAGE_FAULTS   , "%d", MemInfo.cPagingPageFaults);
     1426            if (MemInfo.cPagingPageFaultsActive != OldMemInfo.cPagingPageFaultsActive)
     1427                SetDlgItemTextF(hwnd, TX_MEMINFO_PAGE_FAULTS_ACTIVE, "%d", MemInfo.cPagingPageFaultsActive);
     1428            if (MemInfo.cPagingPhysPages != OldMemInfo.cPagingPhysPages)
     1429                SetDlgItemTextF(hwnd, TX_MEMINFO_PAGE_PHYSPAGES, "%d", MemInfo.cPagingPhysPages);
     1430            if (MemInfo.cPagingResidentPages != OldMemInfo.cPagingResidentPages)
     1431                SetDlgItemTextF(hwnd, TX_MEMINFO_PAGE_RESPAGES , "%d", MemInfo.cPagingResidentPages);
     1432            if (MemInfo.cPagingSwappablePages != OldMemInfo.cPagingSwappablePages)
     1433                SetDlgItemTextF(hwnd, TX_MEMINFO_PAGE_SWAPPAGES, "%d", MemInfo.cPagingSwappablePages);
     1434            if (MemInfo.cPagingDiscardablePages != OldMemInfo.cPagingDiscardablePages)
     1435                SetDlgItemTextF(hwnd, TX_MEMINFO_PAGE_DISCPAGES, "%d", MemInfo.cPagingDiscardablePages);
     1436            if (MemInfo.cPagingDiscardableInmem != OldMemInfo.cPagingDiscardableInmem)
     1437                SetDlgItemTextF(hwnd, TX_MEMINFO_PAGE_DISCINMEM, "%d", MemInfo.cPagingDiscardableInmem);
     1438
     1439            if (MemInfo.ulAddressLimit != OldMemInfo.ulAddressLimit)
     1440                SetDlgItemTextF(hwnd, TX_MEMINFO_VM_ADDRESSLIMIT, "%08xh", MemInfo.ulAddressLimit);
     1441            if (MemInfo.ulVMArenaSharedMin != OldMemInfo.ulVMArenaSharedMin)
     1442                SetDlgItemTextF(hwnd, TX_MEMINFO_VM_SHARED_MIN  , "%08xh", MemInfo.ulVMArenaSharedMin);
     1443            if (MemInfo.ulVMArenaSharedMax != OldMemInfo.ulVMArenaSharedMax)
     1444                SetDlgItemTextF(hwnd, TX_MEMINFO_VM_SHARED_MAX  , "%08xh", MemInfo.ulVMArenaSharedMax);
     1445            if (MemInfo.ulVMArenaPrivMax != OldMemInfo.ulVMArenaPrivMax)
     1446                SetDlgItemTextF(hwnd, TX_MEMINFO_VM_PRIVATE_MAX , "%08xh", MemInfo.ulVMArenaPrivMax);
     1447            if (MemInfo.ulVMArenaSystemMin != OldMemInfo.ulVMArenaSystemMin)
     1448                SetDlgItemTextF(hwnd, TX_MEMINFO_VM_SYSTEM_MIN  , "%08xh", MemInfo.ulVMArenaSystemMin);
     1449            if (MemInfo.ulVMArenaSystemMax != OldMemInfo.ulVMArenaSystemMax)
     1450                SetDlgItemTextF(hwnd, TX_MEMINFO_VM_SYSTEM_MAX  , "%08xh", MemInfo.ulVMArenaSystemMax);
     1451            if (MemInfo.ulVMArenaHighPrivMax != OldMemInfo.ulVMArenaHighPrivMax)
     1452                SetDlgItemTextF(hwnd, TX_MEMINFO_VM_PRIVATE_HMAX, "%08xh", MemInfo.ulVMArenaHighPrivMax);
     1453            if (MemInfo.ulVMArenaHighSharedMin != OldMemInfo.ulVMArenaHighSharedMin)
     1454                SetDlgItemTextF(hwnd, TX_MEMINFO_VM_SHARED_HMIN , "%08xh", MemInfo.ulVMArenaHighSharedMin);
     1455            if (MemInfo.ulVMArenaHighSharedMax != OldMemInfo.ulVMArenaHighSharedMax)
     1456                SetDlgItemTextF(hwnd, TX_MEMINFO_VM_SHARED_HMAX , "%08xh", MemInfo.ulVMArenaHighSharedMax);
     1457
     1458            pThis->MemInfo = MemInfo;
     1459            return NULL;
     1460        }
     1461
     1462        /*
     1463         * Cleanup.
     1464         *
     1465         * mr:  reserved
     1466         * mp1: reserved
     1467         * mp2: reserved
     1468         */
     1469        case WM_DESTROY:
     1470        {
     1471            WinStopTimer(pThis->hab, hwnd, pThis->idMemTimer);
     1472            break;
     1473        }
     1474
     1475    }
     1476
     1477    return NtbkDefPageDlgProc(hwnd, msg, mp1, mp2);
     1478}
     1479
     1480
     1481
     1482/**
     1483 * Default notebook page dialog procedure.
     1484 * (See PMREF for the general specifications of this function.)
     1485 */
     1486MRESULT EXPENTRY    NtbkDefPageDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     1487{
     1488    /*
     1489     * Message switch.
     1490     */
     1491    switch (msg)
     1492    {
     1493        /*
     1494         * Sets the controls according to the data from win32k.
     1495         *
     1496         * mr:  Focus changed or not.
     1497         * mp1: hwnd of dialog
     1498         * mp2: (user data) (pThis for notebook)
     1499         */
     1500        case WM_INITDLG:
     1501        {
     1502            PWIN32KCC   pThis = (PWIN32KCC)mp2;
     1503
     1504            if (!WinSetWindowPtr(hwnd, QWL_USER, mp2))
     1505            {
     1506                /* complain, dismiss and return. */
     1507                Complain(hwnd, IDS_ERR_SET_INSTANCEDATA,
     1508                         WinGetLastError(pThis->hab),
     1509                         getLastErrorMsg(pThis->hab));
     1510                WinPostMsg(hwnd, WM_QUIT, NULL, NULL);
     1511                return FALSE;
     1512            }
    7181513
    7191514            /*
    720              * Check if there is any change and set the fDirty flag accordingly.
     1515             * Install same acceltable as the notebook - Don't work.
    7211516             */
    722             pThis->fDirty = memcmp(&pThis->NewOptions, &pThis->Options, sizeof(K32OPTIONS)) != 0;
    723             return (MPARAM)TRUE;
    724         }
    725 
    726 
    727     }
    728 
    729     /*
    730      * Return thru the default dialog procedure.
    731      */
     1517            WinSetAccelTable(pThis->hab, WinQueryAccelTable(pThis->hab, pThis->hwnd), hwnd);
     1518            break;
     1519        }
     1520
     1521
     1522        /*
     1523         * Gets data from win32k.
     1524         * Sets the controls according to the data from win32k.
     1525         *
     1526         * mr:  reserved
     1527         * mp1: reserved
     1528         * mp2: reserved
     1529         */
     1530        case WM_SETCONTROLS:
     1531        {
     1532            return NULL;
     1533        }
     1534
     1535
     1536        /*
     1537         * Validate data in the controls. Complains accoring to mp1.
     1538         * Put the data into the win32k option struct.
     1539         *
     1540         * mr:  Valid indicator.
     1541         *      TRUE:   Valid data.
     1542         *      FALSE:  Not valid data.
     1543         * mp1: BOOL fComplain.
     1544         *      TRUE:   Do complain about errors. The pThis->Options struct
     1545         *              is updated on successful return.
     1546         *      FALSE:  Do not complain about errors, and don't update the
     1547         *              pThis->Options struct.
     1548         * mp2: reserved.
     1549         */
     1550        case WM_QUERYCONTROLS:
     1551        {
     1552            return (MRESULT)TRUE;
     1553        }
     1554
     1555
     1556        #if 0
     1557        /*
     1558         * Nice little hack to get global notebook accelerators to work.
     1559         *
     1560         * mr:
     1561         *
     1562         */
     1563        case WM_TRANSLATEACCEL:
     1564        {
     1565            static BOOL fSem = FALSE;
     1566            MRESULT     mr;
     1567            PWIN32KCC   pThis = (PWIN32KCC)WinQueryWindowPtr(hwnd, QWL_USER);
     1568            if (fSem || !pThis)
     1569                return FALSE;
     1570            fSem = TRUE;
     1571            mr = WinSendMsg(pThis->hwnd, msg, mp1, mp2);
     1572            fSem = FALSE;
     1573            return mr;
     1574        }
     1575        #endif
     1576    }
     1577
    7321578    return WinDefDlgProc(hwnd, msg, mp1, mp2);
     1579}
     1580
     1581/**
     1582 * Spirintf version of WinSetDlgItemText.
     1583 * @returns Same as WinSetDlgItemText.
     1584 * @param   hwndDlg     Dialog Window Handle.
     1585 * @param   idItem      Control ID.
     1586 * @param   pszFormat   Pointer to format string. (input to sprintf)
     1587 * @param   ..          Additional parameters.
     1588 * @status  completly implemented.
     1589 * @author  knut st. osmundsen (knut.stange.osmundsen@mynd.no)
     1590 */
     1591BOOL    SetDlgItemTextF(HWND hwndDlg, ULONG idItem, PSZ pszFormat, ...)
     1592{
     1593    BOOL    fRc;
     1594    char    sz[64];
     1595    va_list arg;
     1596
     1597    #pragma info(none)
     1598    va_start(arg, pszFormat);
     1599    #pragma info(restore)
     1600    vsprintf(sz, pszFormat, arg);
     1601    va_end(arg);
     1602
     1603    fRc = WinSetDlgItemText(hwndDlg, idItem, sz);
     1604    #ifdef DEBUG
     1605    if (!fRc)
     1606        Complain(hwndDlg, IDS_ERR_ASSERT, __FILE__, __LINE__, __FUNCTION__);
     1607    #endif
     1608
     1609    return fRc;
    7331610}
    7341611
     
    9531830    }
    9541831
     1832    #pragma info(none)
    9551833    return (char*)(*pszStr != '\0' ? (const char*)pszStr - 1 : (const char*)NULL);
     1834    #pragma info(restore)
    9561835}
    9571836
  • trunk/src/win32k/utils/Win32kCC.dlg

    r5119 r5160  
    22   #include <os2.h>
    33#endif
    4 DLGINCLUDE 1 "G:\odin32\tree\src\win32k\utils\Dialog.h"
    5 
    6 DLGTEMPLATE DL_WIN32KCC LOADONCALL MOVEABLE DISCARDABLE
    7 BEGIN
    8     DIALOG  "Win32k Control Center", DL_WIN32KCC, 47, 13, 274, 344,
    9             WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR | FCF_TASKLIST
    10     BEGIN
    11         GROUPBOX        "", GR_W32K, 6, 298, 262, 46
    12         LTEXT           "Symbol file", TX_W32K_SYMBOLFILE, 14, 310, 84, 8
    13         LTEXT           "Kernel Build", TX_W32K_KERNELBUILD, 14, 302, 84, 8
    14         LTEXT           "c:\\os2\\pdpsi\\pmdf\\warp4\\os2krnl.sym",
    15                         TX_W32K_SYMBOLFILE_VAL, 100, 310, 165, 8
    16         LTEXT           "Win32k version", TX_W32K_VERSION, 14, 326, 84, 8
    17         LTEXT           "0.5", TX_W32K_VERSION_VAL, 100, 326, 165, 8
    18         LTEXT           "Build time/date", TX_W32K_BUILD_DATETIME, 14, 318,
     4DLGINCLUDE 1 "D:\odin32\worktree\src\win32k\utils\Dialog.h"
     5
     6DLGTEMPLATE DL_HEAPS_PAGE LOADONCALL MOVEABLE DISCARDABLE
     7BEGIN
     8    DIALOG  "~Heaps", DL_HEAPS_PAGE, 0, 0, 274, 120, NOT FS_DLGBORDER |
     9            WS_VISIBLE
     10    BEGIN
     11        GROUPBOX        "Heaps", GR_HEAPS, 6, 29, 262, 87
     12        GROUPBOX        "Resident Heap", GR_HEAP_RES, 14, 35, 118, 73
     13        LTEXT           "Max (KB):", TX_HEAP_RES_MAX, 22, 89, 53, 8
     14        SPINBUTTON      SB_HEAP_RES_MAX, 82, 89, 42, 8, SPBS_NUMERICONLY |
     15                        SPBS_MASTER | SPBS_FASTSPIN | WS_GROUP
     16        LTEXT           "Initial (KB)", TX_HEAP_RES_INIT, 22, 79, 50, 8
     17        RTEXT           "257", TX_HEAP_RES_INIT_VAL, 78, 79, 46, 8
     18        LTEXT           "Used (KB)", TX_HEAP_RES_USED, 22, 63, 50, 8
     19        RTEXT           "257", TX_HEAP_RES_USED_VAL, 78, 63, 46, 8
     20        GROUPBOX        "Swappable Heap", GR_HEAP_SWP, 142, 35, 118, 73
     21        LTEXT           "Max (KB):", TX_HEAP_SWP_MAX, 150, 89, 53, 8
     22        SPINBUTTON      SB_HEAP_SWP_MAX, 210, 89, 42, 8, SPBS_NUMERICONLY |
     23                        SPBS_MASTER | SPBS_FASTSPIN | WS_GROUP
     24        LTEXT           "Initial (KB)", TX_HEAP_SWP_INIT, 150, 79, 50, 8
     25        RTEXT           "257", TX_HEAP_SWP_INIT_VAL, 206, 79, 46, 8
     26        LTEXT           "Used (KB)", TX_HEAP_SWP_USED, 150, 63, 50, 8
     27        RTEXT           "257", TX_HEAP_SWP_USED_VAL, 206, 63, 46, 8
     28        LTEXT           "Free (KB)", TX_HEAP_RES_FREE, 22, 55, 50, 8
     29        RTEXT           "257", TX_HEAP_RES_FREE_VAL, 78, 55, 46, 8
     30        LTEXT           "Current (KB)", TX_HEAP_RES_SIZE, 22, 71, 56, 8
     31        RTEXT           "257", TX_HEAP_RES_SIZE_VAL, 78, 71, 46, 8
     32        LTEXT           "Used Blocks", TX_HEAP_RES_USED_BLOCKS, 22, 47, 53,
     33                        8
     34        RTEXT           "10", TX_HEAP_RES_USED_BLOCKS_VAL, 78, 47, 46, 8
     35        LTEXT           "Free Blocks", TX_HEAP_RES_FREE_BLOCKS, 22, 39, 53,
     36                        8
     37        RTEXT           "10", TX_HEAP_RES_FREE_BLOCKS_VAL, 78, 39, 46, 8
     38        LTEXT           "Free (KB)", TX_HEAP_SWP_FREE, 150, 55, 50, 8
     39        RTEXT           "257", TX_HEAP_SWP_FREE_VAL, 206, 55, 46, 8
     40        LTEXT           "Current (KB)", TX_HEAP_SWP_SIZE, 150, 71, 56, 8
     41        RTEXT           "257", TX_HEAP_SWP_SIZE_VAL, 206, 71, 46, 8
     42        LTEXT           "Used Blocks", TX_HEAP_SWP_USED_BLOCKS, 150, 47, 53,
     43                        8
     44        RTEXT           "11", TX_HEAP_SWP_USED_BLOCKS_VAL, 206, 47, 46, 8
     45        LTEXT           "Free Blocks", TX_HEAP_SWP_FREE_BLOCKS, 150, 39, 53,
     46                        8
     47        RTEXT           "11", TX_HEAP_SWP_FREE_BLOCKS_VAL, 206, 39, 46, 8
     48    END
     49END
     50
     51DLGTEMPLATE DL_LDRFIX_PAGE LOADONCALL MOVEABLE DISCARDABLE
     52BEGIN
     53    DIALOG  "~OS/2 Enh.", DL_LDRFIX_PAGE, 0, 0, 274, 120, NOT FS_DLGBORDER |
     54            WS_VISIBLE
     55    BEGIN
     56        GROUPBOX        "OS/2 Loader Fixes", GR_LDRFIX, 6, 82, 262, 34
     57        AUTOCHECKBOX    "Long DLL names and non .DLL extention fixes",
     58                        CB_LDRFIX_DLLFIXES, 14, 96, 252, 10
     59        AUTOCHECKBOX    "Force Preload of Executable Modules (ICAT/R3 debug)",
     60                        CB_LDRFIX_FORCEPRELOAD, 14, 86, 252, 10
     61    END
     62END
     63
     64DLGTEMPLATE DL_LOADERS_PAGE LOADONCALL MOVEABLE DISCARDABLE
     65BEGIN
     66    DIALOG  "~Loaders", DL_LOADERS_PAGE, 0, 0, 274, 120, NOT FS_DLGBORDER |
     67            WS_VISIBLE
     68    BEGIN
     69        GROUPBOX        "Loaders", GR_LOADERS, 6, 6, 262, 110
     70        AUTOCHECKBOX    "Disable all loaders", CB_LDR_DISABLE_ALL, 14, 97,
     71                        112, 10
     72        GROUPBOX        "~PE Loader", GR_LDR_PE, 14, 34, 118, 63,
     73                        DT_MNEMONIC
     74        AUTORADIOBUTTON "Pure", RB_LDR_PE_PURE, 22, 78, 44, 9, WS_TABSTOP
     75        AUTORADIOBUTTON "Mixed", RB_LDR_PE_MIXED, 22, 69, 44, 9, WS_TABSTOP
     76        AUTORADIOBUTTON "PE.EXE", RB_LDR_PE_PE, 78, 78, 44, 9, WS_TABSTOP
     77        AUTORADIOBUTTON "Disabled", RB_LDR_PE_NOT, 78, 69, 51, 9, WS_TABSTOP
     78        CONTROL         "All-In-One-Object Fix", CK_LDR_PE_ONEOBJECT, 22, 59,
     79                        102, 10, WC_BUTTON, BS_AUTO3STATE | BS_AUTOSIZE |
     80                        WS_TABSTOP | WS_VISIBLE
     81        SPINBUTTON      SB_LDR_PE_INFOLEVEL, 96, 48, 28, 12,
     82                        SPBS_NUMERICONLY | SPBS_MASTER | WS_GROUP
     83        LTEXT           "Infolevel:", TX_LDR_PE_INFOLEVEL, 22, 48, 48, 8
     84        LTEXT           "Modules", TX_LDR_PE_MODULES, 22, 38, 48, 8
     85        RTEXT           "3", TX_LDR_PE_MODULES_VAL, 77, 38, 47, 8
     86        GROUPBOX        "~ELF Loader", GR_LDR_ELF, 142, 53, 118, 44,
     87                        DT_MNEMONIC | WS_DISABLED
     88        AUTOCHECKBOX    "Enabled", CB_LDR_ELF_ENABLED, 150, 77, 55, 10,
     89                        WS_DISABLED
     90        LTEXT           "Infolevel:", TX_LDR_ELF_INFOLEVEL, 150, 67, 48, 8,
     91                        WS_DISABLED
     92        SPINBUTTON      SB_LDR_ELF_INFOLEVEL, 224, 67, 28, 12,
     93                        SPBS_NUMERICONLY | SPBS_MASTER | WS_GROUP |
     94                        WS_DISABLED
     95        LTEXT           "Modules", TX_LDR_ELF_MODULES, 150, 57, 48, 8,
     96                        WS_DISABLED
     97        RTEXT           "3", TX_LDR_ELF_MODULES_VAL, 205, 57, 47, 8,
     98                        WS_DISABLED
     99        AUTOCHECKBOX    "UNIX Shell Scripts", CB_LDR_SHELL_SCRIPTS, 14, 20,
     100                        118, 10
     101        AUTOCHECKBOX    "JAVA", CB_LDR_JAVA, 142, 20, 118, 10
     102        AUTOCHECKBOX    "(Pure) REXX Scripts (.RX/.REX)", CB_LDR_REXX, 14,
     103                        10, 160, 10
     104    END
     105END
     106
     107DLGTEMPLATE DL_LOGGING_PAGE LOADONCALL MOVEABLE DISCARDABLE
     108BEGIN
     109    DIALOG  "Lo~gging", DL_LOGGING_PAGE, 0, 0, 274, 120, NOT FS_DLGBORDER |
     110            WS_VISIBLE
     111    BEGIN
     112        GROUPBOX        "Logging", GR_LOGGING, 6, 62, 139, 54
     113        AUTOCHECKBOX    "Enabled", CB_LOGGING_ENABLED, 14, 96, 50, 10
     114        AUTORADIOBUTTON "COM1 (3f8h)", RB_LOGGING_COM1, 73, 96, 64, 10,
     115                        WS_TABSTOP
     116        AUTORADIOBUTTON "COM2 (2f8h)", RB_LOGGING_COM2, 73, 86, 64, 10,
     117                        WS_TABSTOP
     118        AUTORADIOBUTTON "COM3 (3e8h)", RB_LOGGING_COM3, 73, 76, 64, 10,
     119                        WS_TABSTOP
     120        AUTORADIOBUTTON "COM4 (238h)", RB_LOGGING_COM4, 73, 66, 64, 10,
     121                        WS_TABSTOP
     122    END
     123END
     124
     125DLGTEMPLATE DL_MEMINFO_PAGE LOADONCALL MOVEABLE DISCARDABLE
     126BEGIN
     127    DIALOG  "~MemInfo", DL_MEMINFO_PAGE, 0, 0, 274, 120, NOT FS_DLGBORDER |
     128            WS_VISIBLE
     129    BEGIN
     130        GROUPBOX        "Swapfile", 1602, 6, 42, 102, 72
     131                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     132        LTEXT           "Size", 1603, 11, 100, 52, 7
     133                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     134        LTEXT           "Avail", 1604, 11, 93, 52, 7
     135                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     136        LTEXT           "Used", 1605, 11, 86, 52, 7
     137                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     138        LTEXT           "Min Free", 1606, 11, 79, 52, 7
     139                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     140        LTEXT           "CFG Min Free", 1607, 11, 72, 52, 7
     141                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     142        LTEXT           "CFG Size", 1608, 11, 65, 52, 7
     143                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     144        LTEXT           "Broken DFs", 1609, 11, 58, 52, 7
     145                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     146        LTEXT           "Grow Fails", GR_MEMINFO_SWAP, 11, 51, 52, 7
     147                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     148        LTEXT           "DFs in Memfile", -1, 11, 44, 52, 7
     149                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     150        RTEXT           "108384", TX_MEMINFO_SWAP_SIZE, 64, 100, 28, 7
     151                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     152        RTEXT           "108384", TX_MEMINFO_SWAP_AVAIL, 64, 93, 28, 7
     153                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     154        RTEXT           "108384", TX_MEMINFO_SWAP_USED, 64, 86, 28, 7
     155                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     156        RTEXT           "108384", TX_MEMINFO_SWAP_MINFREE, 64, 79, 28, 7
     157                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     158        RTEXT           "108384", TX_MEMINFO_SWAP_CFG_MINFREE, 64, 72, 28, 7
     159                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     160        RTEXT           "108384", TX_MEMINFO_SWAP_CFG_SIZE, 64, 65, 28, 7
     161                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     162        RTEXT           "108384", TX_MEMINFO_SWAP_BROKEN_DFS, 64, 58, 28, 7
     163                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     164        RTEXT           "108384", TX_MEMINFO_SWAP_GROW_FAILS, 64, 51, 28, 7
     165                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     166        RTEXT           "108384", TX_MEMINFO_SWAP_DFS_IN_MEMFILE, 64, 44, 28,
     167                        7
     168                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     169        LTEXT           "KB", 1621, 93, 100, 10, 7
     170                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     171        LTEXT           "KB", 1622, 93, 93, 10, 7
     172                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     173        LTEXT           "KB", 1623, 93, 86, 10, 7
     174                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     175        LTEXT           "KB", 1624, 93, 79, 10, 7
     176                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     177        LTEXT           "KB", 1625, 93, 72, 10, 7
     178                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     179        LTEXT           "KB", 1626, 93, 65, 10, 7
     180                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     181        GROUPBOX        "Physical/Paging", GR_MEMINFO_PHYSPAGE, 113, 42, 155,
     182                        72
     183                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     184        LTEXT           "Size", 1627, 118, 100, 21, 7
     185                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     186        LTEXT           "Avail", 1628, 118, 93, 21, 7
     187                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     188        LTEXT           "Used", 1629, 118, 86, 21, 7
     189                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     190        RTEXT           "108384", TX_MEMINFO_PHYS_SIZE, 139, 100, 28, 7
     191                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     192        RTEXT           "108384", TX_MEMINFO_PHYS_AVAIL, 139, 93, 28, 7
     193                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     194        RTEXT           "108384", TX_MEMINFO_PHYS_USED, 139, 86, 28, 7
     195                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     196        LTEXT           "KB", 1633, 168, 100, 10, 7
     197                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     198        LTEXT           "KB", 1634, 168, 93, 10, 7
     199                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     200        LTEXT           "KB", 1635, 168, 86, 10, 7
     201                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     202        LTEXT           "Faults", 1636, 201, 93, 34, 7
     203                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     204        RTEXT           "108384", TX_MEMINFO_PAGE_FAULTS, 235, 93, 28, 7
     205                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     206        LTEXT           "Active faults", 1639, 201, 86, 39, 7
     207                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     208        RTEXT           "108384", TX_MEMINFO_PAGE_FAULTS_ACTIVE, 240, 86, 23,
     209                        7
     210                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     211        LTEXT           "Paging", 1638, 201, 100, 30, 7
     212                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     213        LTEXT           "Resident Pages", TX_MEMINFO_PHYS_USED, 118, 65, 75,
     214                        7
     215                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     216        RTEXT           "108384", TX_MEMINFO_PAGE_RESPAGES, 201, 65, 28, 7
     217                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     218        LTEXT           "Swappable Pages", 1645, 118, 58, 75, 7
     219                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     220        RTEXT           "108384", TX_MEMINFO_PAGE_SWAPPAGES, 201, 58, 28, 7
     221                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     222        LTEXT           "Discardable Pages", 1647, 118, 51, 75, 7
     223                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     224        RTEXT           "108384", TX_MEMINFO_PAGE_DISCPAGES, 201, 51, 28, 7
     225                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     226        LTEXT           "Discardable In Memory", 1649, 118, 44, 75, 7
     227                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     228        RTEXT           "108384", TX_MEMINFO_PAGE_DISCINMEM, 201, 44, 28, 7
     229                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     230        LTEXT           "Physical Pages", TX_MEMINFO_PHYS_AVAIL, 118, 72, 75,
     231                        7
     232                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     233        RTEXT           "108384", TX_MEMINFO_PAGE_PHYSPAGES, 201, 72, 28, 7
     234                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     235        GROUPBOX        "Virtual Memory / Arenas", GR_MEMINFO_VM, 6, 7, 262,
     236                        30
     237                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     238        LTEXT           "Address Limit", TX_MEMINFO_PAGE_FAULTS_ACTIVE, 11,
     239                        23, 48, 7
     240                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     241        RTEXT           "20000000h", TX_MEMINFO_VM_ADDRESSLIMIT, 61, 23, 35,
     242                        7
     243                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     244        LTEXT           "Shared Min", TX_MEMINFO_PAGE_RESPAGES, 11, 16, 48,
     245                        7
     246                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     247        RTEXT           "20000000h", TX_MEMINFO_VM_SHARED_MIN, 61, 16, 35, 7
     248                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     249        LTEXT           "Shared Max", TX_MEMINFO_PAGE_DISCPAGES, 11, 9, 48,
     250                        7
     251                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     252        RTEXT           "20000000h", TX_MEMINFO_VM_SHARED_MAX, 61, 9, 35, 7
     253                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     254        LTEXT           "Privat Max", 1659, 100, 23, 44, 7
     255                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     256        RTEXT           "20000000h", TX_MEMINFO_VM_PRIVATE_MAX, 144, 23, 35,
     257                        7
     258                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     259        LTEXT           "Priv HMax", 1661, 186, 23, 42, 7
     260                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     261        RTEXT           "20000000h", TX_MEMINFO_VM_PRIVATE_HMAX, 228, 23, 35,
     262                        7
     263                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     264        LTEXT           "Shrd HMin", 1663, 186, 16, 42, 7
     265                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     266        RTEXT           "20000000h", TX_MEMINFO_VM_SHARED_HMIN, 228, 16, 35,
     267                        7
     268                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     269        LTEXT           "Shrd HMax", 1665, 186, 9, 42, 7
     270                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     271        RTEXT           "20000000h", TX_MEMINFO_VM_SHARED_HMAX, 228, 9, 35,
     272                        7
     273                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     274        LTEXT           "System Min", 1667, 100, 16, 44, 7
     275                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     276        RTEXT           "20000000h", TX_MEMINFO_VM_SYSTEM_MIN, 144, 16, 35,
     277                        7
     278                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     279        LTEXT           "System Max", 1669, 100, 9, 44, 7
     280                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     281        RTEXT           "20000000h", TX_MEMINFO_VM_SYSTEM_MAX, 144, 9, 35, 7
     282                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
     283        AUTOCHECKBOX    "", TX_MEMINFO_PAGE_ENABLED, 231, 100, 7, 7
     284    END
     285END
     286
     287DLGTEMPLATE PG_WIN32K_INFO_PAGE LOADONCALL MOVEABLE DISCARDABLE
     288BEGIN
     289    DIALOG  "~Win32k Info", PG_WIN32K_INFO_PAGE, 0, 0, 274, 120, NOT
     290            FS_DLGBORDER | WS_VISIBLE
     291    BEGIN
     292        GROUPBOX        "", GR_W32K, 6, 70, 262, 46
     293        LTEXT           "Symbol file", TX_W32K_SYMBOLFILE, 14, 82, 84, 8
     294        LTEXT           "Kernel Build", TX_W32K_KERNELBUILD, 14, 74, 84, 8
     295        LTEXT           "c:\\os2\\pdpsi\\pmdf\\warp4\\os2krnl.sym",
     296                        TX_W32K_SYMBOLFILE_VAL, 100, 82, 165, 8
     297        LTEXT           "Win32k version", TX_W32K_VERSION, 14, 98, 84, 8
     298        LTEXT           "0.5", TX_W32K_VERSION_VAL, 100, 98, 165, 8
     299        LTEXT           "Build time/date", TX_W32K_BUILD_DATETIME, 14, 90,
    19300                        84, 8
    20         LTEXT           "04:30:12 Sep 01 2000", TX_W32K_BUILD_DATETIME_VAL,
    21                         100, 318, 165, 8
    22         LTEXT           "9.036", TX_W32K_KERNELBUILD_VAL, 100, 302, 165, 8
    23         GROUPBOX        "Logging", GR_LOGGING, 6, 270, 262, 24
    24         AUTOCHECKBOX    "Enabled", CB_LOGGING_ENABLED, 14, 274, 50, 10
    25         AUTORADIOBUTTON "COM1", RB_LOGGING_COM1, 76, 274, 36, 10, WS_TABSTOP
    26         AUTORADIOBUTTON "COM2", RB_LOGGING_COM2, 123, 274, 36, 10,
    27                         WS_TABSTOP
    28         AUTORADIOBUTTON "COM3", RB_LOGGING_COM3, 167, 274, 36, 10,
    29                         WS_TABSTOP
    30         AUTORADIOBUTTON "COM4", RB_LOGGING_COM4, 213, 274, 36, 10,
    31                         WS_TABSTOP
    32         GROUPBOX        "Loaders", GR_LOADERS, 6, 155, 262, 111
    33         AUTOCHECKBOX    "Disable all loaders", CB_LDR_DISABLE_ALL, 14, 246,
    34                         112, 10
    35         GROUPBOX        "~PE Loader", GR_LDR_PE, 14, 183, 118, 63,
    36                         DT_MNEMONIC
    37         AUTORADIOBUTTON "Pure", RB_LDR_PE_PURE, 22, 227, 44, 9, WS_TABSTOP
    38         AUTORADIOBUTTON "Mixed", RB_LDR_PE_MIXED, 22, 218, 44, 9, WS_TABSTOP
    39         AUTORADIOBUTTON "PE.EXE", RB_LDR_PE_PE, 78, 227, 44, 9, WS_TABSTOP
    40         AUTORADIOBUTTON "Disabled", RB_LDR_PE_NOT, 78, 218, 51, 9,
    41                         WS_TABSTOP
    42         CONTROL         "All-In-One-Object Fix", CK_LDR_PE_ONEOBJECT, 22,
    43                         208, 102, 10, WC_BUTTON, BS_AUTO3STATE | BS_AUTOSIZE |
    44                         WS_TABSTOP | WS_VISIBLE
    45         SPINBUTTON      SB_LDR_PE_INFOLEVEL, 96, 197, 28, 12,
    46                         SPBS_NUMERICONLY | SPBS_MASTER | WS_GROUP
    47         LTEXT           "Infolevel:", TX_LDR_PE_INFOLEVEL, 22, 197, 48, 8
    48         GROUPBOX        "~ELF Loader", GR_LDR_ELF, 142, 202, 118, 44,
    49                         DT_MNEMONIC | WS_DISABLED
    50         AUTOCHECKBOX    "Enabled", CB_LDR_ELF_ENABLED, 150, 226, 55, 10,
    51                         WS_DISABLED
    52         LTEXT           "Infolevel:", TX_LDR_ELF_INFOLEVEL, 150, 216, 48, 8,
    53                         WS_DISABLED
    54         SPINBUTTON      SB_LDR_ELF_INFOLEVEL, 224, 216, 28, 12,
    55                         SPBS_NUMERICONLY | SPBS_MASTER | WS_GROUP |
    56                         WS_DISABLED
    57         AUTOCHECKBOX    "UNIX Shell Scripts", CB_LDR_SHELL_SCRIPTS, 14, 169,
    58                         118, 10
    59         AUTOCHECKBOX    "JAVA", CB_LDR_JAVA, 142, 169, 118, 10
    60         AUTOCHECKBOX    "(Pure) REXX Scripts (.RX/.REX)", CB_LDR_REXX, 14,
    61                         159, 160, 10
    62         GROUPBOX        "OS/2 Loader Fixes", GR_LDRFIX, 6, 115, 262, 34
    63         AUTOCHECKBOX    "Long DLL names and non .DLL extention fixes",
    64                         CB_LDRFIX_DLLFIXES, 14, 129, 252, 10
    65         AUTOCHECKBOX    "Force Preload of Executable Modules (ICAT/R3 debug)",
    66                         CB_LDRFIX_FORCEPRELOAD, 14, 119, 252, 10
    67         GROUPBOX        "Heaps", GR_HEAPS, 6, 26, 262, 85
    68         GROUPBOX        "Resident Heap", GR_HEAP_RES, 14, 30, 118, 73
    69         LTEXT           "Max (KB):", TX_HEAP_RES_MAX, 22, 84, 53, 8
    70         SPINBUTTON      SB_HEAP_RES_MAX, 82, 84, 42, 8, SPBS_NUMERICONLY |
    71                         SPBS_MASTER | SPBS_FASTSPIN | WS_GROUP
    72         LTEXT           "Initial (KB)", TX_HEAP_RES_INIT, 22, 74, 50, 8
    73         RTEXT           "257", TX_HEAP_RES_INIT_VAL, 78, 74, 46, 8
    74         LTEXT           "Used (KB)", TX_HEAP_RES_USED, 22, 58, 50, 8
    75         RTEXT           "257", TX_HEAP_RES_USED_VAL, 78, 58, 46, 8
    76         GROUPBOX        "Swappable Heap", GR_HEAP_SWP, 142, 30, 118, 73
    77         LTEXT           "Max (KB):", TX_HEAP_SWP_MAX, 150, 84, 53, 8
    78         SPINBUTTON      SB_HEAP_SWP_MAX, 210, 84, 42, 8, SPBS_NUMERICONLY |
    79                         SPBS_MASTER | SPBS_FASTSPIN | WS_GROUP
    80         LTEXT           "Initial (KB)", TX_HEAP_SWP_INIT, 150, 74, 50, 8
    81         RTEXT           "257", TX_HEAP_SWP_INIT_VAL, 206, 74, 46, 8
    82         LTEXT           "Used (KB)", TX_HEAP_SWP_USED, 150, 58, 50, 8
    83         RTEXT           "257", TX_HEAP_SWP_USED_VAL, 206, 58, 46, 8
    84         LTEXT           "Free (KB)", TX_HEAP_RES_FREE, 22, 50, 50, 8
    85         RTEXT           "257", TX_HEAP_RES_FREE_VAL, 78, 50, 46, 8
    86         LTEXT           "Current (KB)", TX_HEAP_RES_SIZE, 22, 66, 56, 8
    87         RTEXT           "257", TX_HEAP_RES_SIZE_VAL, 78, 66, 46, 8
    88         LTEXT           "Used Blocks", TX_HEAP_RES_USED_BLOCKS, 22, 42, 53,
    89                         8
    90         RTEXT           "10", TX_HEAP_RES_USED_BLOCKS_VAL, 78, 42, 46, 8
    91         LTEXT           "Free Blocks", TX_HEAP_RES_FREE_BLOCKS, 22, 34, 53,
    92                         8
    93         RTEXT           "10", TX_HEAP_RES_FREE_BLOCKS_VAL, 78, 34, 46, 8
    94         LTEXT           "Free (KB)", TX_HEAP_SWP_FREE, 150, 50, 50, 8
    95         RTEXT           "257", TX_HEAP_SWP_FREE_VAL, 206, 50, 46, 8
    96         LTEXT           "Current (KB)", TX_HEAP_SWP_SIZE, 150, 66, 56, 8
    97         RTEXT           "257", TX_HEAP_SWP_SIZE_VAL, 206, 66, 46, 8
    98         LTEXT           "Used Blocks", TX_HEAP_SWP_USED_BLOCKS, 150, 42, 53,
    99                         8
    100         RTEXT           "11", TX_HEAP_SWP_USED_BLOCKS_VAL, 206, 42, 46, 8
    101         LTEXT           "Free Blocks", TX_HEAP_SWP_FREE_BLOCKS, 150, 34, 53,
    102                         8
    103         RTEXT           "11", TX_HEAP_SWP_FREE_BLOCKS_VAL, 206, 34, 46, 8
    104         LTEXT           "Modules", TX_LDR_PE_MODULES, 22, 187, 48, 8
    105         RTEXT           "3", TX_LDR_PE_MODULES_VAL, 77, 187, 47, 8
    106         LTEXT           "Modules", TX_LDR_ELF_MODULES, 150, 206, 48, 8,
    107                         WS_DISABLED
    108         RTEXT           "3", TX_LDR_ELF_MODULES_VAL, 205, 206, 47, 8,
    109                         WS_DISABLED
    110         DEFPUSHBUTTON   "~Refresh", PB_REFRESH, 6, 5, 40, 14
    111         PUSHBUTTON      "~Apply", PB_APPLY, 49, 5, 40, 14
    112         PUSHBUTTON      "Update Config.sys", PB_UPD_CONFIGSYS, 92, 5, 100,
    113                         14
    114         PUSHBUTTON      "~Close", DID_OK, 195, 5, 40, 14
    115     END
    116 END
     301        LTEXT           "04:30:12 Sep 01 2000", TX_W32K_BUILD_DATETIME_VAL,
     302                        100, 90, 165, 8
     303        LTEXT           "9.036", TX_W32K_KERNELBUILD_VAL, 100, 74, 165, 8
     304    END
     305END
  • trunk/src/win32k/utils/Win32kCC.h

    r5051 r5160  
    1 /* $Id: Win32kCC.h,v 1.6 2001-02-02 08:41:31 bird Exp $
     1/* $Id: Win32kCC.h,v 1.7 2001-02-17 20:25:44 bird Exp $
    22 *
    33 *
     
    2626#define  IDS_ERR_DIALOGLOAD             1
    2727#define  IDS_ERR_MALLOC_FAILED          2
    28 #define  IDS_ERR_SET_INSTACEDATA        3
    29 #define  IDS_ERR_WIN32K_NOT_LOADED      4
    30 #define  IDS_ERR_WIN32K_OPEN_FAILED     5
    31 #define  IDS_ERR_QUERYOPTIONSTATUS      6
    32 #define  IDS_ERR_NO_COM_RADIOBUTTON     7
    33 #define  IDS_ERR_NO_PE_RADIOBUTTON      8
    34 #define  IDS_ERR_NO_PE_ONEOBJECT        9
    35 #define  IDS_ERR_INVALID_INFOLEVEL      10
    36 #define  IDS_ERR_INVALID_MAXHEAPSIZE    11
    37 #define  IDS_ERR_SETPOPTIONS            12
    38 #define  IDS_ERR_FOPEN_FAILED           13
    39 #define  IDS_FSIZE_FAILED               14
    40 #define  IDS_MALLOC_FAILED              15
    41 #define  IDS_FWRITE_FAILED              16
     28#define  IDS_ERR_SET_INSTANCEDATA       3
     29#define  IDS_ERR_ADD_NTBK_PAGE_LOAD     4
     30#define  IDS_ERR_ADD_NTBK_PAGE_INSERT   5
     31#define  IDS_ERR_ADD_NTBK_PAGE_SET      6
     32#define  IDS_ERR_WIN32K_NOT_LOADED      7
     33#define  IDS_ERR_WIN32K_OPEN_FAILED     8
     34#define  IDS_ERR_QUERYOPTIONSTATUS      9
     35#define  IDS_ERR_NO_COM_RADIOBUTTON     10
     36#define  IDS_ERR_NO_PE_RADIOBUTTON      11
     37#define  IDS_ERR_NO_PE_ONEOBJECT        12
     38#define  IDS_ERR_INVALID_INFOLEVEL      13
     39#define  IDS_ERR_INVALID_MAXHEAPSIZE    14
     40#define  IDS_ERR_SETPOPTIONS            15
     41#define  IDS_ERR_FOPEN_FAILED           16
     42#define  IDS_FSIZE_FAILED               17
     43#define  IDS_MALLOC_FAILED              18
     44#define  IDS_FWRITE_FAILED              19
     45#define  IDS_ERR_FAILED_TO_LOAD_DLGT    20
     46#define  IDS_ERR_FAILED_NTBK_BUTTONS    21
     47#define  IDS_ERR_ASSERT                 22
     48#define  IDS_ERR_TIMER_START            23
    4249
    4350
  • trunk/src/win32k/utils/Win32kCC.rc

    r5051 r5160  
    1 /* $Id: Win32kCC.rc,v 1.5 2001-02-02 08:41:31 bird Exp $
     1/* $Id: Win32kCC.rc,v 1.6 2001-02-17 20:25:44 bird Exp $
    22 *
    33 * Resource File for Win32k Control Center.
     
    88 *
    99 */
    10 
     10#define INCL_WINSTDBOOK
    1111#include <os2.h>
    1212#include "Win32kCC.h"
     
    2222    IDS_ERR_DIALOGLOAD,         "Failed to load dialog.\rdialogid = %d\rlasterr = 0x%x\rmsg = %s"
    2323    IDS_ERR_MALLOC_FAILED,      "Malloc failed. (file %s; line %d; function %s)"
    24     IDS_ERR_SET_INSTACEDATA,    "Call to WinSetWindowPtr failed.\rlasterror = %d\rmsg = %s"
     24    IDS_ERR_SET_INSTANCEDATA,   "Call to WinSetWindowPtr failed.\rlasterror = %d\rmsg = %s"
     25    IDS_ERR_ADD_NTBK_PAGE_LOAD, "Error! Failed to Load page dialog, id = %d.\rlasterror = %d\rmsg = %s"
     26    IDS_ERR_ADD_NTBK_PAGE_INSERT,"Error! Failed to insert page notebook page, id = %d.\rlasterror = %d\rmsg = %s"
     27    IDS_ERR_ADD_NTBK_PAGE_SET,  "Error! Failed to set page hwnd, id = %d.\rlasterror = %d\rmsg = %s"
    2528    IDS_ERR_WIN32K_NOT_LOADED,  "Win32k.sys is not loaded.\rTo fix it you'll have to add it to your config.sys. (see the Odin32 readme.txt for more details.)"
    2629    IDS_ERR_WIN32K_OPEN_FAILED, "Failed to open Win32k.sys. (rc=0x%x)"
     
    3639    IDS_MALLOC_FAILED,          "Error! malloc or calloc failed to allocate %d bytes of memory."
    3740    IDS_FWRITE_FAILED,          "Error! failed to write to file %s."
     41    IDS_ERR_FAILED_TO_LOAD_DLGT,"Error! Failed to load dialog template id=%d, rc=%d"
     42    IDS_ERR_FAILED_NTBK_BUTTONS, "Error! Failed to add notebook buttons.\rlasterr = %d\rmsg = %s"
     43    IDS_ERR_ASSERT,             "Assertion Failed. %s(%d), %s"
     44    IDS_ERR_TIMER_START,        "Failed to start mem info refresh timer.\rlasserror =%d\rmsg = %s"
    3845END
    3946
     
    4855
    4956
     57/*
     58 * Put these here as DlgEdit messes up the flags.
     59 */
     60DLGTEMPLATE DL_WIN32KCC
     61BEGIN
     62    DIALOG  "Win32k Control Center", DL_WIN32KCC, 40, 30, 322, 220, WS_VISIBLE,
     63            FCF_SYSMENU | FCF_TITLEBAR | FCF_TASKLIST | FCF_HIDEBUTTON | FCF_CLOSEBUTTON
     64    BEGIN
     65        NOTEBOOK        DL_WIN32KCC_NTBK, 6, 24, 310, 196,
     66                        BKS_BACKPAGESTR |
     67                        BKS_TABTEXTCENTER |
     68                        BKS_TABBEDDIALOG |
     69                        WS_GROUP
     70        DEFPUSHBUTTON   "~Refresh", PB_REFRESH, 6, 4, 40, 14
     71        PUSHBUTTON      "~Apply", PB_APPLY, 49, 4, 40, 14
     72        PUSHBUTTON      "Update Config.sys", PB_UPD_CONFIGSYS, 92, 4, 100,
     73                        14
     74        PUSHBUTTON      "~Close", DID_OK, 195, 4, 40, 14
     75    END
     76END
     77
     78DLGTEMPLATE DL_WIN32KCC_OLD
     79BEGIN
     80    DIALOG  "Win32k Control Center", DL_WIN32KCC_OLD, 40, 30, 322, 220, WS_VISIBLE,
     81            FCF_SYSMENU | FCF_TITLEBAR | FCF_TASKLIST | FCF_HIDEBUTTON | FCF_CLOSEBUTTON
     82    BEGIN
     83        NOTEBOOK        DL_WIN32KCC_NTBK, 6, 24, 310, 196, BKS_BACKPAGESTR |
     84                        BKS_TABTEXTCENTER | BKS_SOLIDBIND |
     85                        WS_GROUP
     86        DEFPUSHBUTTON   "~Refresh", PB_REFRESH, 6, 4, 40, 14
     87        PUSHBUTTON      "~Apply", PB_APPLY, 49, 4, 40, 14
     88        PUSHBUTTON      "Update Config.sys", PB_UPD_CONFIGSYS, 92, 4, 100,
     89                        14
     90        PUSHBUTTON      "~Close", DID_OK, 195, 4, 40, 14
     91    END
     92END
     93
     94
     95/*
     96 * Accelerator table.
     97 */
     98ACCELTABLE DL_WIN32KCC
     99BEGIN
     100    "a", PB_APPLY,      ALT
     101    "A", PB_APPLY,      ALT
     102    "c", DID_OK,        ALT
     103    "C", DID_OK,        ALT
     104    "r", PB_REFRESH,    ALT
     105    "R", PB_REFRESH,    ALT
     106END
     107
     108
     109/*
     110 * Redefine ID to prevent duplicate IDs.
     111 */
     112#undef DL_WIN32KCC
     113#undef DL_WIN32KCC_OLD
     114#define DL_WIN32KCC             61010
     115#define DL_WIN32KCC_OLD         61011
     116
    50117RCINCLUDE "Win32kCC.dlg"
     118
Note: See TracChangeset for help on using the changeset viewer.