00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
#include "precomp.h"
00020
#pragma hdrstop
00021
00022 __inline
int
00023 MetricGetID(
00024 PUNICODE_STRING pProfileUserName,
00025 UINT idStr,
00026
int defValue
00027 )
00028 {
00029
return FastGetProfileIntFromID(
00030 pProfileUserName,
PMAP_METRICS, idStr, defValue);
00031 }
00032
00033 static CONST WORD
sysBmpStyles[
OBI_COUNT][2] = {
00034
00035 DFC_CAPTION, DFCS_CAPTIONCLOSE,
00036 DFC_CAPTION, DFCS_CAPTIONCLOSE | DFCS_PUSHED,
00037 DFC_CAPTION, DFCS_CAPTIONCLOSE | DFCS_HOT,
00038 DFC_CAPTION, DFCS_CAPTIONCLOSE | DFCS_INACTIVE,
00039 DFC_CAPTION, DFCS_CAPTIONMIN,
00040 DFC_CAPTION, DFCS_CAPTIONMIN | DFCS_PUSHED,
00041 DFC_CAPTION, DFCS_CAPTIONMIN | DFCS_HOT,
00042 DFC_CAPTION, DFCS_CAPTIONMIN | DFCS_INACTIVE,
00043 DFC_CAPTION, DFCS_CAPTIONRESTORE,
00044 DFC_CAPTION, DFCS_CAPTIONRESTORE | DFCS_PUSHED,
00045 DFC_CAPTION, DFCS_CAPTIONRESTORE | DFCS_HOT,
00046 DFC_CAPTION, DFCS_CAPTIONHELP,
00047 DFC_CAPTION, DFCS_CAPTIONHELP | DFCS_PUSHED,
00048 DFC_CAPTION, DFCS_CAPTIONHELP | DFCS_HOT,
00049 DFC_CAPTION, DFCS_CAPTIONMAX,
00050 DFC_CAPTION, DFCS_CAPTIONMAX | DFCS_PUSHED,
00051 DFC_CAPTION, DFCS_CAPTIONMAX | DFCS_HOT,
00052 DFC_CAPTION, DFCS_CAPTIONMAX | DFCS_INACTIVE,
00053 DFC_CAPTION, DFCS_CAPTIONCLOSE | DFCS_INMENU,
00054 DFC_CAPTION, DFCS_CAPTIONCLOSE | DFCS_INMENU | DFCS_PUSHED,
00055 DFC_CAPTION, DFCS_CAPTIONCLOSE | DFCS_INMENU | DFCS_HOT,
00056 DFC_CAPTION, DFCS_CAPTIONCLOSE | DFCS_INMENU | DFCS_INACTIVE,
00057 DFC_CAPTION, DFCS_CAPTIONMIN | DFCS_INMENU,
00058 DFC_CAPTION, DFCS_CAPTIONMIN | DFCS_INMENU | DFCS_PUSHED,
00059 DFC_CAPTION, DFCS_CAPTIONMIN | DFCS_INMENU | DFCS_HOT,
00060 DFC_CAPTION, DFCS_CAPTIONMIN | DFCS_INMENU | DFCS_INACTIVE,
00061 DFC_CAPTION, DFCS_CAPTIONRESTORE | DFCS_INMENU,
00062 DFC_CAPTION, DFCS_CAPTIONRESTORE | DFCS_INMENU | DFCS_PUSHED,
00063 DFC_CAPTION, DFCS_CAPTIONRESTORE | DFCS_INMENU | DFCS_HOT,
00064 DFC_CACHE, DFCS_CACHEICON,
00065 DFC_CACHE, DFCS_CACHEICON | DFCS_INACTIVE,
00066 DFC_CACHE, DFCS_CACHEICON,
00067 DFC_CACHE, DFCS_CACHEICON | DFCS_INACTIVE,
00068 DFC_CACHE, DFCS_CACHEICON,
00069 DFC_CACHE, DFCS_CACHEICON | DFCS_INACTIVE,
00070 DFC_CACHE, DFCS_CACHEICON,
00071 DFC_CACHE, DFCS_CACHEICON | DFCS_INACTIVE,
00072 DFC_CACHE, DFCS_CACHEICON,
00073 DFC_CACHE, DFCS_CACHEICON | DFCS_INACTIVE,
00074 DFC_CACHE, DFCS_CACHEBUTTONS,
00075 DFC_CACHE, DFCS_CACHEBUTTONS | DFCS_INACTIVE,
00076 DFC_CAPTION, DFCS_CAPTIONCLOSE | DFCS_INSMALL,
00077 DFC_CAPTION, DFCS_CAPTIONCLOSE | DFCS_INSMALL | DFCS_PUSHED,
00078 DFC_CAPTION, DFCS_CAPTIONCLOSE | DFCS_INSMALL | DFCS_HOT,
00079 DFC_CAPTION, DFCS_CAPTIONCLOSE | DFCS_INSMALL | DFCS_INACTIVE,
00080 DFC_SCROLL, DFCS_SCROLLSIZEGRIP,
00081 DFC_SCROLL, DFCS_SCROLLUP,
00082 DFC_SCROLL, DFCS_SCROLLUP | DFCS_PUSHED | DFCS_FLAT,
00083 DFC_SCROLL, DFCS_SCROLLUP | DFCS_HOT,
00084 DFC_SCROLL, DFCS_SCROLLUP | DFCS_INACTIVE,
00085 DFC_SCROLL, DFCS_SCROLLDOWN,
00086 DFC_SCROLL, DFCS_SCROLLDOWN | DFCS_PUSHED | DFCS_FLAT,
00087 DFC_SCROLL, DFCS_SCROLLDOWN | DFCS_HOT,
00088 DFC_SCROLL, DFCS_SCROLLDOWN | DFCS_INACTIVE,
00089 DFC_SCROLL, DFCS_SCROLLRIGHT,
00090 DFC_SCROLL, DFCS_SCROLLRIGHT | DFCS_PUSHED | DFCS_FLAT,
00091 DFC_SCROLL, DFCS_SCROLLRIGHT | DFCS_HOT,
00092 DFC_SCROLL, DFCS_SCROLLRIGHT | DFCS_INACTIVE,
00093 DFC_SCROLL, DFCS_SCROLLLEFT,
00094 DFC_SCROLL, DFCS_SCROLLLEFT | DFCS_PUSHED | DFCS_FLAT,
00095 DFC_SCROLL, DFCS_SCROLLLEFT | DFCS_HOT,
00096 DFC_SCROLL, DFCS_SCROLLLEFT | DFCS_INACTIVE,
00097 DFC_MENU, DFCS_MENUARROW,
00098 DFC_MENU, DFCS_MENUCHECK,
00099 DFC_MENU, DFCS_MENUBULLET,
00100 DFC_MENU, DFCS_MENUARROWUP,
00101 DFC_MENU, DFCS_MENUARROWUP | DFCS_HOT,
00102 DFC_MENU, DFCS_MENUARROWUP | DFCS_INACTIVE,
00103 DFC_MENU, DFCS_MENUARROWDOWN,
00104 DFC_MENU, DFCS_MENUARROWDOWN | DFCS_HOT,
00105 DFC_MENU, DFCS_MENUARROWDOWN | DFCS_INACTIVE,
00106 DFC_BUTTON, DFCS_BUTTONRADIOMASK,
00107 DFC_BUTTON, DFCS_BUTTONCHECK,
00108 DFC_BUTTON, DFCS_BUTTONCHECK | DFCS_CHECKED,
00109 DFC_BUTTON, DFCS_BUTTONCHECK | DFCS_PUSHED,
00110 DFC_BUTTON, DFCS_BUTTONCHECK | DFCS_CHECKED | DFCS_PUSHED,
00111 DFC_BUTTON, DFCS_BUTTONCHECK | DFCS_CHECKED | DFCS_INACTIVE,
00112 DFC_BUTTON, DFCS_BUTTONRADIOIMAGE,
00113 DFC_BUTTON, DFCS_BUTTONRADIOIMAGE | DFCS_CHECKED,
00114 DFC_BUTTON, DFCS_BUTTONRADIOIMAGE | DFCS_PUSHED,
00115 DFC_BUTTON, DFCS_BUTTONRADIOIMAGE | DFCS_CHECKED | DFCS_PUSHED,
00116 DFC_BUTTON, DFCS_BUTTONRADIOIMAGE | DFCS_CHECKED | DFCS_INACTIVE,
00117 DFC_BUTTON, DFCS_BUTTON3STATE,
00118 DFC_BUTTON, DFCS_BUTTON3STATE | DFCS_CHECKED,
00119 DFC_BUTTON, DFCS_BUTTON3STATE | DFCS_PUSHED,
00120 DFC_BUTTON, DFCS_BUTTON3STATE | DFCS_CHECKED | DFCS_PUSHED,
00121 DFC_BUTTON, DFCS_BUTTON3STATE | DFCS_CHECKED | DFCS_INACTIVE,
00122 DFC_POPUPMENU, DFCS_CAPTIONCLOSE | DFCS_INMENU,
00123 DFC_POPUPMENU, DFCS_CAPTIONRESTORE | DFCS_INMENU,
00124 DFC_POPUPMENU, DFCS_CAPTIONMAX | DFCS_INMENU,
00125 DFC_POPUPMENU, DFCS_CAPTIONMIN | DFCS_INMENU,
00126 DFC_SCROLL, DFCS_SCROLLSIZEGRIPRIGHT,
00127 DFC_MENU, DFCS_MENUARROWRIGHT
00128 };
00129
00130 #define DIVISOR 72
00131 #define DU_BTNWIDTH 50 // D.U. of minimum button width in a message box
00132
00133
UINT xxxMB_FindLongestString(HDC hdc);
00134
00135
#ifdef LATER
00136
00137
00138
00139 WCHAR NibbleToChar(
00140 BYTE x)
00141 {
00142 WCHAR
static N2C[] =
00143 {
00144
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
00145
'8',
'9',
'A',
'B',
'C',
'D',
'E',
'F',
00146 };
00147
00148
return N2C[x];
00149 }
00150
00151
BYTE CharToNibble(
00152 WCHAR ch)
00153 {
00154
BYTE x = (
BYTE)ch;
00155
00156
return x >=
'0' && x <=
'9' ?
00157 x -
'0' :
00158 ((10 + x -
'A' ) & 0x0f);
00159 }
00160
00161
00162
00163
00164
BOOL TextToBinary(
00165 LPBYTE pbyte,
00166 LPWSTR pwstr,
00167
int length)
00168 {
00169
BYTE checksum = 0;
00170
00171
while (
TRUE) {
00172
BYTE byte;
00173
00174 byte = (CharToNibble(pwstr[0]) << 4) | CharToNibble(pwstr[1]);
00175
00176
if (length == 0) {
00177
return checksum == byte;
00178 }
00179
00180 checksum += byte;
00181 *pbyte = byte;
00182
00183 pwstr += 2;
00184 length--;
00185 pbyte++;
00186 }
00187 }
00188
00189
void BinaryToText(
00190 LPWSTR pwstr,
00191 LPBYTE pbyte,
00192
int length)
00193 {
00194
BYTE checksum = 0;
00195
00196
while (length > 0) {
00197 checksum += *pbyte;
00198
00199 pwstr[0] = NibbleToChar((BYTE)((*pbyte >> 4) & 0x0f));
00200 pwstr[1] = NibbleToChar((BYTE)(*pbyte & 0x0f));
00201
00202 pbyte++;
00203 pwstr += 2;
00204 length--;
00205 }
00206
00207 pwstr[0] = NibbleToChar((BYTE)((checksum >> 4) & 0x0f));
00208 pwstr[1] = NibbleToChar((BYTE)(checksum & 0x0f));
00209 pwstr[2] =
'\0';
00210 }
00211
00212
00213
00214
00215
00216
00217
00218
BOOL GetPrivateProfileStruct(
00219 LPWSTR szSection,
00220 LPWSTR szKey,
00221 LPWSTR lpStruct,
00222 DWORD uSizeStruct,
00223 LPWSTR szFile)
00224 {
00225 WCHAR szBuf[256];
00226
BOOL fAlloc =
FALSE;
00227 LPSTR lpBuf, lpBufTemp;
00228
int nLen;
00229
BOOL fError =
FALSE;
00230
00231 nLen = uSizeStruct * 4 + 10;
00232
if (nLen > (WORD)
sizeof(szBuf)) {
00233 fAlloc =
TRUE;
00234 lpBuf = (LPSTR)UserAllocPoolWithQuota(nLen, TAG_PROFILE);
00235
if (lpBuf ==
NULL)
00236
return FALSE;
00237 }
else {
00238 lpBuf = (LPSTR)szBuf;
00239 }
00240
00241
if (
szFile && *
szFile) {
00242 nLen = GetPrivateProfileString(szSection, szKey, NULL, lpBuf, nLen, szFile);
00243 }
else {
00244 nLen = GetProfileString(szSection, szKey, NULL, lpBuf, nLen);
00245 }
00246
00247
if (nLen == (
int)(uSizeStruct * 4 + 4)) {
00248
00249
00250
00251 fError = TextToBinary(lpStruct, lpBufTemp, uSizeStruct);
00252 }
00253
00254
if (fAlloc)
00255 UserFreePool(lpBuf);
00256
00257
return fError;
00258 }
00259
00260
BOOL WritePrivateProfileStruct(
00261 LPWSTR szSection,
00262 LPWSTR szKey,
00263 LPWSTR lpStruct,
00264 WORD uSizeStruct,
00265 LPWSTR szFile)
00266 {
00267 LPWSTR lpBuf;
00268
BOOL bRet;
00269
BOOL fAlloc;
00270 WCHAR szBuf[256];
00271
BYTE checksum=0;
00272
int allocsize = (uSizeStruct * 2 + 3) *
sizeof(WCHAR);
00273
00274
00275
00276
if (lpStruct ==
NULL) {
00277
if (
szFile && *
szFile) {
00278
return WritePrivateProfileString(szSection, szKey, (LPSTR)NULL, szFile);
00279 }
else {
00280
return WriteProfileString(szSection, szKey, (LPSTR)NULL);
00281 }
00282 }
00283
00284 fAlloc = (allocsize >
sizeof(szBuf));
00285
if (fAlloc) {
00286 lpBuf = (LPSTR)UserAllocPoolWithQuota(allocsize, TAG_PROFILE);
00287
if (!lpBuf)
00288
return FALSE;
00289 }
else {
00290 lpBuf = (LPSTR)szBuf;
00291 }
00292
00293 BinaryToText(lpBuf, lpStruct, uSizeStruct);
00294
00295
if (
szFile && *
szFile) {
00296 bRet = WritePrivateProfileString(szSection, szKey, lpBuf, szFile);
00297 }
else {
00298 bRet = WriteProfileString(szSection, szKey, lpBuf);
00299 }
00300
00301
if (fAlloc)
00302 UserFreePool(lpBuf);
00303
00304
return bRet;
00305 }
00306
#endif
00307
00308
00309
00310
00311
00312
00313
00314
00315 int GetFrameControlMetrics(
00316 UINT obi,
00317
int cxMax )
00318 {
00319
int cx,
cy;
00320
UINT wType =
sysBmpStyles[obi][0];
00321
UINT wState =
sysBmpStyles[obi][1];
00322
POEMBITMAPINFO pOem =
gpsi->oembmi + obi;
00323
00324
switch (wType) {
00325
case DFC_SCROLL:
00326
if (wState & DFCS_SCROLLSIZEGRIP) {
00327 cx =
SYSMET(CXVSCROLL);
00328
cy =
SYSMET(CYHSCROLL);
00329
break;
00330 }
else if (wState & DFCS_SCROLLHORZ) {
00331 cx =
SYSMET(CXHSCROLL);
00332
cy =
SYSMET(CYHSCROLL);
00333 }
else {
00334 cx =
SYSMET(CXVSCROLL);
00335
cy =
SYSMET(CYVSCROLL);
00336 }
00337
break;
00338
00339
case DFC_MENU:
00340
case DFC_POPUPMENU:
00341
if (wState & (DFCS_MENUARROWUP | DFCS_MENUARROWDOWN)) {
00342
cy =
gcyMenuScrollArrow;
00343 }
else {
00344
00345
00346
00347
00348
cy = ((
gcyMenuFontChar +
gcyMenuFontExternLeading +
SYSMET(CYBORDER)) & 0xFFFE) - 1;
00349 }
00350 cx =
cy;
00351
break;
00352
00353
case DFC_CAPTION:
00354
if (wState & DFCS_INSMALL) {
00355 cx =
SYSMET(CXSMSIZE);
00356
cy =
SYSMET(CYSMSIZE);
00357 }
else if (wState & DFCS_INMENU) {
00358
if ((
SYSMET(CXSIZE) ==
SYSMET(CXMENUSIZE)) &&
00359 (
SYSMET(CYSIZE) ==
SYSMET(CYMENUSIZE))) {
00360 cx = 0;
00361
cy = obi -
DOBI_MBAR;
00362
break;
00363 }
else {
00364 cx =
SYSMET(CXMENUSIZE);
00365
cy =
SYSMET(CYMENUSIZE);
00366 }
00367 }
else {
00368 cx =
SYSMET(CXSIZE);
00369
cy =
SYSMET(CYSIZE);
00370 }
00371
00372 cx -=
SYSMET(CXEDGE);
00373
cy -= 2 *
SYSMET(CYEDGE);
00374
break;
00375
00376
case DFC_CACHE:
00377
if (wState & DFCS_CACHEBUTTONS) {
00378 cx =
SYSMET(CXSIZE) * 4;
00379
cy =
SYSMET(CYSIZE);
00380 }
else
00381 cx =
cy =
SYSMET(CYSIZE);
00382
break;
00383
00384
case DFC_BUTTON:
00385
if (((wState & 0x00FF) & DFCS_BUTTON3STATE) && !(wState & DFCS_CHECKED)) {
00386 cx = 0;
00387
cy = obi -
DOBI_3STATE;
00388 }
else {
00389 cx = 13;
00390
cy = 13;
00391 }
00392
break;
00393 }
00394
00395 pOem->
cx = cx;
00396 pOem->
cy =
cy;
00397
00398
return((cx > cxMax) ? cx : cxMax);
00399 }
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411 int PackFrameControls(
int cxMax, BOOL fRecord) {
00412
UINT obi;
00413
int cy = 0;
00414
int x = 0;
00415
int y = 0;
00416
00417
00418
POEMBITMAPINFO pOem =
gpsi->oembmi;
00419
00420
for (obi = 0; obi <
OBI_COUNT; obi++, pOem++) {
00421
if (pOem->
cx) {
00422
if ((x + pOem->
cx) > cxMax) {
00423 y +=
cy;
00424
cy = 0;
00425 x = 0;
00426 }
00427
00428
if (fRecord) {
00429 pOem->
x = x;
00430 pOem->
y = y;
00431 }
00432
00433
if (
cy < pOem->
cy)
00434
cy = pOem->
cy;
00435
00436 x += pOem->
cx;
00437 }
00438 }
00439
00440
return(y +
cy);
00441 }
00442
00443
00444 void DrawCaptionButtons(
00445
int x,
00446
int y
00447 )
00448 {
00449 x +=
SYSMET(CXEDGE);
00450 y +=
SYSMET(CYEDGE);
00451
00452
BitBltSysBmp(
HDCBITS(), x, y,
OBI_REDUCE);
00453 x +=
SYSMET(CXSIZE) -
SYSMET(CXEDGE);
00454
BitBltSysBmp(
HDCBITS(), x, y,
OBI_ZOOM);
00455 x +=
SYSMET(CXSIZE);
00456
BitBltSysBmp(
HDCBITS(), x, y,
OBI_CLOSE);
00457 x +=
SYSMET(CXSIZE);
00458
BitBltSysBmp(
HDCBITS(), x, y,
OBI_HELP);
00459 }
00460
00461
00462
00463
00464
00465
00466 HBITMAP
CreateCaptionStrip(VOID)
00467 {
00468 HBITMAP hbm;
00469
00470 hbm = GreCreateCompatibleBitmap(
gpDispInfo->
hdcScreen,
00471
SYSMET(CXVIRTUALSCREEN),
00472 (
SYSMET(CYCAPTION) - 1) * 2);
00473
00474
if (hbm)
00475 GreSetBitmapOwner(hbm, OBJECT_OWNER_PUBLIC);
00476
00477
return hbm;
00478 }
00479
00480 int cy[5];
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494 BOOL CreateBitmapStrip(VOID)
00495 {
00496
int cxBmp = 0;
00497
int cyBmp = 0;
00498
int iCache = 0;
00499 HBITMAP hOldBitmap;
00500 HBITMAP hNewBmp;
00501
UINT iType;
00502 RECT rc;
00503
UINT wBmpType;
00504
UINT wBmpStyle;
00505
POEMBITMAPINFO pOem;
00506
00507
00508
00509
00510 UserAssert(
OBI_COUNT ==
sizeof(
sysBmpStyles) /
sizeof(*
sysBmpStyles));
00511 UserAssert(
OBI_COUNT ==
sizeof(
gpsi->oembmi) /
sizeof(*(
gpsi->oembmi)));
00512
00513
00514
00515
00516
for (iType = 0; iType <
OBI_COUNT; iType++)
00517 cxBmp =
GetFrameControlMetrics(iType, cxBmp);
00518
00519
for (iType = 0; iType < 5; iType++)
00520
cy[iType] =
PackFrameControls(cxBmp * (iType + 1),
FALSE) * (iType + 1);
00521
00522 cyBmp =
min(
cy[0],
min(
cy[1],
min(
cy[2],
min(
cy[3],
cy[4]))));
00523
for (iType = 0; cyBmp !=
cy[iType]; iType++);
00524
00525 cxBmp *= iType + 1;
00526 cyBmp =
PackFrameControls(cxBmp,
TRUE);
00527
00528 hNewBmp = GreCreateCompatibleBitmap(
gpDispInfo->
hdcScreen, cxBmp, cyBmp);
00529
00530
if (hNewBmp ==
NULL) {
00531 RIPMSG0(RIP_WARNING,
"CreateBitmapStrip: failed to create bitmap");
00532
return FALSE;
00533 }
00534
00535 GreSetBitmapOwner(hNewBmp, OBJECT_OWNER_PUBLIC);
00536
00537
00538
00539
00540
00541
00542 hOldBitmap = GreSelectBitmap(
HDCBITS(), hNewBmp);
00543
00544
if (
ghbmBits) {
00545
#if DBG
00546
00547
00548
00549
if (hOldBitmap !=
NULL) {
00550 UserAssert(
ghbmBits == hOldBitmap);
00551 }
00552
#endif
00553
GreDeleteObject(
ghbmCaption);
00554 GreDeleteObject(hOldBitmap);
00555 }
else {
00556
00557
00558
00559 GreExtTextOutW(
HDCBITS(), 0, 0, 0,
NULL, (PWSTR)
szOneChar, 1,
NULL);
00560 }
00561
00562
ghbmBits = hNewBmp;
00563
00564
ghbmCaption =
CreateCaptionStrip();
00565
00566
if (
ghbmCaption ==
NULL) {
00567 RIPMSG0(RIP_WARNING,
"CreateBitmapStrip: failed to create bitmap for caption");
00568
return FALSE;
00569 }
00570
00571
00572
00573
00574
for (pOem =
gpsi->oembmi, iType = 0; iType <
OBI_COUNT; iType++, pOem++) {
00575
if (!pOem->
cx) {
00576 *pOem =
gpsi->oembmi[pOem->
cy];
00577 }
else {
00578 rc.left = pOem->
x;
00579 rc.top = pOem->
y;
00580 rc.right = rc.left + pOem->
cx;
00581 rc.bottom = rc.top + pOem->
cy;
00582
00583 wBmpType =
sysBmpStyles[iType][0];
00584 wBmpStyle =
sysBmpStyles[iType][1];
00585
00586
if (wBmpType == DFC_CACHE) {
00587
if (wBmpStyle & DFCS_CACHEBUTTONS) {
00588 HBRUSH hbr;
00589
if (
TestALPHA(GRADIENTCAPTIONS)) {
00590 hbr = (wBmpStyle & DFCS_INACTIVE) ?
SYSHBR(GRADIENTINACTIVECAPTION) :
SYSHBR(GRADIENTACTIVECAPTION);
00591 }
else {
00592 hbr = (wBmpStyle & DFCS_INACTIVE) ?
SYSHBR(INACTIVECAPTION) :
SYSHBR(ACTIVECAPTION);
00593 }
00594
FillRect(
HDCBITS(), &rc, hbr);
00595
DrawCaptionButtons(rc.left, rc.top);
00596 }
else if (!(wBmpStyle & DFCS_INACTIVE)) {
00597
00598
00599
00600 UserAssert(iCache <
CCACHEDCAPTIONS);
00601
if (
gcachedCaptions[iCache].
spcursor) {
00602
Unlock(&(
gcachedCaptions[iCache].spcursor));
00603 }
00604
gcachedCaptions[iCache++].
pOem = pOem;
00605 }
00606 }
else {
00607
DrawFrameControl(
HDCBITS(), &rc, wBmpType, wBmpStyle);
00608 }
00609 }
00610 }
00611
00612
00613
00614
00615
SYSMET(CXMENUCHECK) =
gpsi->oembmi[
OBI_MENUCHECK].cx;
00616
SYSMET(CYMENUCHECK) =
gpsi->oembmi[
OBI_MENUCHECK].cy;
00617
00618
return TRUE;
00619 }
00620
00621
void
00622 SetNCMetrics(
00623 LPNONCLIENTMETRICS lpnc
00624 )
00625 {
00626
int nMin;
00627
00628
00629
00630
00631
SYSMET(CXVSCROLL) =
SYSMET(CYHSCROLL) = (
int) lpnc->iScrollWidth;
00632
SYSMET(CYVSCROLL) =
SYSMET(CXHSCROLL) = (
int) lpnc->iScrollHeight;
00633
SYSMET(CYVTHUMB) =
SYSMET(CXHTHUMB) = (
int) lpnc->iScrollHeight;
00634
00635
00636
00637
00638
SYSMET(CXSIZE) = (
int) lpnc->iCaptionWidth;
00639
SYSMET(CYSIZE) = (
int) lpnc->iCaptionHeight;
00640
SYSMET(CYCAPTION) =
SYSMET(CYSIZE) +
SYSMET(CYBORDER);
00641
00642
00643
00644
00645
00646
SYSMET(CXSMICON) = (
SYSMET(CXSIZE) -
SYSMET(CXEDGE)) & ~1;
00647
SYSMET(CYSMICON) = (
SYSMET(CYSIZE) -
SYSMET(CYEDGE)) & ~1;
00648 nMin =
min(
SYSMET(CXSMICON),
SYSMET(CYSMICON));
00649
SYSMET(CXSMICON) = nMin;
00650
SYSMET(CYSMICON) = nMin;
00651
00652
00653
00654
00655
SYSMET(CXSMSIZE) = (
int) lpnc->iSmCaptionWidth;
00656
SYSMET(CYSMSIZE) = (
int) lpnc->iSmCaptionHeight;
00657
SYSMET(CYSMCAPTION) =
SYSMET(CYSMSIZE) +
SYSMET(CYBORDER);
00658
00659
00660
00661
00662
SYSMET(CXMENUSIZE) = (
int) lpnc->iMenuWidth;
00663
SYSMET(CYMENUSIZE) = (
int) lpnc->iMenuHeight;
00664
SYSMET(CYMENU) =
SYSMET(CYMENUSIZE) +
SYSMET(CYBORDER);
00665
00666
00667
00668
00669
gpsi->gclBorder = (
int) lpnc->iBorderWidth;
00670
00671
SYSMET(CXFRAME) =
SYSMET(CXEDGE) + (
gpsi->gclBorder+1)*
SYSMET(CXBORDER);
00672
SYSMET(CYFRAME) =
SYSMET(CYEDGE) + (
gpsi->gclBorder+1)*
SYSMET(CYBORDER);
00673
00674
00675
00676
00677
00678
00679
00680
00681
SYSMET(CXMINTRACK) =
SYSMET(CYSIZE) + (
gcxCaptionFontChar * 4) + 2 *
SYSMET(CXEDGE) +
00682 (
SYSMET(CXSIZE) * 3) + (
SYSMET(CXSIZEFRAME) * 2);
00683
SYSMET(CYMINTRACK) =
SYSMET(CYCAPTION) + (
SYSMET(CYSIZEFRAME) * 2);
00684
00685
00686
00687
00688
00689
00690
00691
00692
SYSMET(CXMAXTRACK) =
SYSMET(CXVIRTUALSCREEN) + (2 * (
SYSMET(CXSIZEFRAME) +
SYSMET(CXEDGE)));
00693
SYSMET(CYMAXTRACK) =
SYSMET(CYVIRTUALSCREEN) + (2 * (
SYSMET(CYSIZEFRAME) +
SYSMET(CYEDGE)));
00694
00695
SYSMET(CXMIN) =
SYSMET(CXMINTRACK);
00696
SYSMET(CYMIN) =
SYSMET(CYMINTRACK);
00697
00698
SYSMET(CYMINIMIZED) = 2*
SYSMET(CYFIXEDFRAME) +
SYSMET(CYSIZE);
00699
00700
00701
00702
00703 bSetDevDragWidth(
gpDispInfo->
hDev,
00704
gpsi->gclBorder +
BORDER_EXTRA);
00705
00706
SetDesktopMetrics();
00707 }
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719 HFONT
CreateFontFromWinIni(
00720 PUNICODE_STRING pProfileUserName,
00721 LPLOGFONTW lplf,
00722 UINT idFont)
00723 {
00724 LOGFONTW
lf;
00725 HFONT hFont;
00726
00727
if (lplf ==
NULL) {
00728
static CONST WCHAR szDefFont[] = TEXT(
"MS Shell Dlg");
00729
00730
00731
00732 lplf = &
lf;
00733 RtlZeroMemory(&
lf,
sizeof(
lf));
00734
lf.lfCharSet =
gSystemCPCharSet;
00735
00736
FastGetProfileValue(pProfileUserName,
PMAP_METRICS, (LPWSTR)UIntToPtr( idFont ),
NULL, (LPBYTE)&
lf,
sizeof(
lf));
00737
00738
00739
00740
00741
if (!
lf.lfFaceName[0]) {
00742 RtlCopyMemory(
lf.lfFaceName, szDefFont,
sizeof(szDefFont));
00743 }
00744
00745
00746
00747
00748
00749
00750
if (!
lf.lfHeight) {
00751
switch (idFont) {
00752
case STR_SMCAPTIONFONT:
00753
case STR_MINFONT:
00754
case STR_ICONFONT:
00755
default:
00756
lf.lfHeight = 8;
00757
break;
00758 }
00759 }
00760
00761
00762
00763
00764
00765
if (
lf.lfHeight > 0) {
00766
lf.lfHeight = -
MultDiv(
lf.lfHeight,
gpsi->dmLogPixels, 72);
00767 }
00768
00769
if (!
lf.lfWeight) {
00770
switch (idFont) {
00771
case STR_CAPTIONFONT:
00772
case STR_MINFONT:
00773
lf.lfWeight = FW_BOLD;
00774
break;
00775
00776
default:
00777
lf.lfWeight = FW_NORMAL;
00778
break;
00779 }
00780 }
00781
00782
lf.lfOutPrecision = OUT_DEFAULT_PRECIS;
00783
lf.lfClipPrecision = CLIP_DEFAULT_PRECIS;
00784
lf.lfQuality = DEFAULT_QUALITY;
00785 }
00786
00787
00788 hFont = GreCreateFontIndirectW(lplf);
00789
00790
if (hFont) {
00791 LOGFONTW lfT;
00792
00793 GreExtGetObjectW(hFont,
sizeof(LOGFONTW), &lfT);
00794
if (lfT.lfHeight != lplf->lfHeight) {
00795
00796
00797
00798
00799 GreDeleteObject(hFont);
00800 hFont =
NULL;
00801 }
else {
00802 GreMarkUndeletableFont(hFont);
00803 GreSetLFONTOwner((HLFONT)hFont, OBJECT_OWNER_PUBLIC);
00804 }
00805 }
00806
00807
if (!hFont) {
00808
00809
00810
00811
00812
00813
if (lplf)
00814 hFont =
NULL;
00815
else
00816 hFont =
ghFontSys;
00817 }
00818
00819
return hFont;
00820 }
00821
00822
00823
00824
00825
00826
00827 BOOL UserSetFont(
00828 PUNICODE_STRING pProfileUserName,
00829 LPLOGFONTW lplf,
00830 UINT idFont,
00831 HFONT* phfont)
00832 {
00833 HFONT hNewFont;
00834
00835
if (hNewFont =
CreateFontFromWinIni(pProfileUserName, lplf, idFont)) {
00836
if (*phfont !=
NULL && *phfont !=
ghFontSys) {
00837 GreMarkDeletableFont(*phfont);
00838 GreDeleteObject(*phfont);
00839 }
00840
00841 *phfont = hNewFont;
00842
return TRUE;
00843 }
00844
return FALSE;
00845 }
00846
00847
00848
00849
00850
00851
00852
00853
00854
00855
00856
00857
00858
00859
00860
00861 BOOL xxxSetNCFonts(
00862 PUNICODE_STRING pProfileUserName,
00863 LPNONCLIENTMETRICS lpnc)
00864 {
00865 HFONT hOldFont;
00866 TEXTMETRIC tm;
00867 LOGFONTW
lf;
00868 LPLOGFONTW lplf = (lpnc) ? &
lf : 0;
00869
00870
00871
00872
00873
if (lplf) {
00874 *lplf = lpnc->lfCaptionFont;
00875 }
00876
00877
if (!
UserSetFont(pProfileUserName,lplf, STR_CAPTIONFONT, &
gpsi->hCaptionFont)) {
00878 RIPMSG0(RIP_WARNING,
"xxxSetNCFonts failed for gpsi->hCaptionFont");
00879
return FALSE;
00880 }
00881
00882 hOldFont = GreSelectFont(
HDCBITS(),
gpsi->hCaptionFont);
00883
gcxCaptionFontChar =
GetCharDimensions(
00884
HDCBITS(),
NULL, &
gcyCaptionFontChar);
00885
00886
00887
00888
00889
if (lplf) {
00890 *lplf = lpnc->lfSmCaptionFont;
00891 }
00892
00893
if (!
UserSetFont(pProfileUserName,lplf, STR_SMCAPTIONFONT, &
ghSmCaptionFont)) {
00894 RIPMSG0(RIP_WARNING,
"xxxSetNCFonts failed for ghSmCaptionFont");
00895
return FALSE;
00896 }
00897
00898 GreSelectFont(
HDCBITS(),
ghSmCaptionFont);
00899
gcxSmCaptionFontChar =
GetCharDimensions(
00900
HDCBITS(),
NULL, &
gcySmCaptionFontChar);
00901
00902
00903
00904
00905
if (lplf) {
00906 *lplf = lpnc->lfMenuFont;
00907 }
00908
00909
if (!
UserSetFont(pProfileUserName,lplf, STR_MENUFONT, &
ghMenuFont)) {
00910 RIPMSG0(RIP_WARNING,
"xxxSetNCFonts failed for ghMenuFont");
00911
return FALSE;
00912 }
00913
00914
00915
00916
00917
if (
gMenuState.hdcAni !=
NULL) {
00918 GreSelectFont(
gMenuState.hdcAni,
ghMenuFont);
00919 }
00920
00921 GreSelectFont(
HDCBITS(),
ghMenuFont);
00922
gcxMenuFontChar =
GetCharDimensions(
00923
HDCBITS(), &tm, &
gcyMenuFontChar);
00924
gcxMenuFontOverhang = tm.tmOverhang;
00925
00926
gcyMenuFontExternLeading = tm.tmExternalLeading;
00927
gcyMenuScrollArrow =
gcyMenuFontChar +
gcyMenuFontExternLeading +
SYSMET(CYEDGE);
00928
gcyMenuFontAscent = tm.tmAscent;
00929
00930
00931
00932
00933
00934
00935
00936
00937
00938
00939
gcyMenuFontAscent +=
SYSMET(CYBORDER);
00940
00941
00942
00943
00944
00945
00946
00947
00948
00949
if (
ghMenuFontDef !=
NULL &&
ghMenuFontDef !=
ghFontSys) {
00950 GreMarkDeletableFont(
ghMenuFontDef);
00951 GreDeleteObject(
ghMenuFontDef);
00952
ghMenuFontDef =
NULL;
00953 }
00954
00955 GreExtGetObjectW(
ghMenuFont,
sizeof(LOGFONTW), &
lf);
00956
if (
lf.lfWeight < FW_BOLD) {
00957
lf.lfWeight += 200;
00958
00959
ghMenuFontDef = GreCreateFontIndirectW(&
lf);
00960
if (
ghMenuFontDef) {
00961 GreMarkUndeletableFont(
ghMenuFontDef);
00962 GreSetLFONTOwner((HLFONT)
ghMenuFontDef, OBJECT_OWNER_PUBLIC);
00963 }
00964 }
00965
00966
00967
00968
00969
if (lplf) {
00970 *lplf = lpnc->lfStatusFont;
00971 }
00972
00973
if (!
UserSetFont(pProfileUserName,lplf, STR_STATUSFONT, &
ghStatusFont)) {
00974 RIPMSG0(RIP_WARNING,
"xxxSetNCFonts failed for ghStatusFont");
00975
return FALSE;
00976 }
00977
00978
00979
00980
00981
if (lplf) {
00982 *lplf = lpnc->lfMessageFont;
00983 }
00984
00985
if (!
UserSetFont(pProfileUserName,lplf, STR_MESSAGEFONT, &
gpsi->hMsgFont)) {
00986 RIPMSG0(RIP_WARNING,
"xxxSetNCFonts failed for gpsi->hMsgFont");
00987
return FALSE;
00988 }
00989
00990 GreSelectFont(
HDCBITS(),
gpsi->hMsgFont);
00991
gpsi->cxMsgFontChar =
GetCharDimensions(
00992
HDCBITS(),
NULL, &
gpsi->cyMsgFontChar);
00993
00994
00995
00996
00997
00998
gpsi->
wMaxBtnSize =
max((
UINT)
XPixFromXDU(
DU_BTNWIDTH,
gpsi->cxMsgFontChar),
00999
xxxMB_FindLongestString(
HDCBITS()));
01000 GreSelectFont(
HDCBITS(), hOldFont);
01001
01002
return TRUE;
01003 }
01004
01005
01006
BOOL
01007 SetIconFonts(
01008 PUNICODE_STRING pProfileUserName,
01009 LPICONMETRICS lpicon)
01010 {
01011 LOGFONTW
lf;
01012 LPLOGFONTW lplf = 0;
01013
01014
if (lpicon) {
01015 lplf = &
lf;
01016
lf = lpicon->lfFont;
01017 }
01018
01019
return UserSetFont(pProfileUserName, lplf, STR_ICONFONT, &
ghIconFont);
01020 }
01021
01022
01023
01024
01025
01026
01027
01028
01029
01030 VOID GetWindowNCMetrics(
01031 LPNONCLIENTMETRICS lpnc)
01032 {
01033 lpnc->cbSize =
sizeof(NONCLIENTMETRICS);
01034 lpnc->iBorderWidth =
gpsi->gclBorder;
01035 lpnc->iScrollWidth =
SYSMET(CXVSCROLL);
01036 lpnc->iScrollHeight =
SYSMET(CYVSCROLL);
01037 lpnc->iCaptionWidth =
SYSMET(CXSIZE);
01038 lpnc->iCaptionHeight =
SYSMET(CYSIZE);
01039 lpnc->iSmCaptionWidth =
SYSMET(CXSMSIZE);
01040 lpnc->iSmCaptionHeight =
SYSMET(CYSMSIZE);
01041 lpnc->iMenuWidth =
SYSMET(CXMENUSIZE);
01042 lpnc->iMenuHeight =
SYSMET(CYMENUSIZE);
01043
01044
01045
01046
01047 GreExtGetObjectW(
gpsi->hCaptionFont,
01048
sizeof(LOGFONTW),
01049 &(lpnc->lfCaptionFont));
01050
01051 GreExtGetObjectW(
ghSmCaptionFont,
01052
sizeof(LOGFONTW),
01053 &(lpnc->lfSmCaptionFont));
01054
01055 GreExtGetObjectW(
ghMenuFont,
01056
sizeof(LOGFONTW),
01057 &(lpnc->lfMenuFont));
01058
01059 GreExtGetObjectW(
ghStatusFont,
01060
sizeof(LOGFONTW),
01061 &(lpnc->lfStatusFont));
01062
01063 GreExtGetObjectW(
gpsi->hMsgFont,
01064
sizeof(LOGFONTW),
01065 &(lpnc->lfMessageFont));
01066 }
01067
01068
01069
01070
01071
01072
01073
01074
01075
01076
01077
01078
01079
01080 BOOL xxxSetWindowNCMetrics(
01081 PUNICODE_STRING pProfileUserName,
01082 LPNONCLIENTMETRICS lpnc,
01083 BOOL fSizeChange,
01084
int clNewBorder)
01085 {
01086 NONCLIENTMETRICS nc;
01087
int cxEdge4;
01088
01089
if (fSizeChange) {
01090
if (!
xxxSetNCFonts(pProfileUserName, lpnc)) {
01091 RIPMSG0(RIP_WARNING,
"xxxSetWindowNCMetrics failed in xxxSetNCFonts");
01092
return FALSE;
01093 }
01094
01095
if (lpnc ==
NULL) {
01096
if (clNewBorder < 0)
01097 nc.iBorderWidth =
MetricGetID(pProfileUserName,STR_BORDERWIDTH, 1);
01098
else
01099 nc.iBorderWidth = clNewBorder;
01100
01101 nc.iScrollWidth =
MetricGetID(pProfileUserName,STR_SCROLLWIDTH, 16 );
01102 nc.iScrollHeight =
MetricGetID(pProfileUserName,STR_SCROLLHEIGHT, 16 );
01103 nc.iCaptionWidth =
MetricGetID(pProfileUserName,STR_CAPTIONWIDTH, 18 );
01104 nc.iCaptionHeight =
MetricGetID(pProfileUserName,STR_CAPTIONHEIGHT, 18 );
01105 nc.iSmCaptionWidth =
MetricGetID(pProfileUserName,STR_SMCAPTIONWIDTH, 13 );
01106 nc.iSmCaptionHeight =
MetricGetID(pProfileUserName,STR_SMCAPTIONHEIGHT, 13 );
01107 nc.iMenuWidth =
MetricGetID(pProfileUserName,STR_MENUWIDTH, 18 );
01108 nc.iMenuHeight =
MetricGetID(pProfileUserName,STR_MENUHEIGHT, 18 );
01109
01110 lpnc = &nc;
01111 }
01112
01113
01114
01115
01116 cxEdge4 = 4 *
SYSMET(CXEDGE);
01117
01118
01119
01120
01121 lpnc->iBorderWidth =
max(lpnc->iBorderWidth, 1);
01122 lpnc->iBorderWidth =
min(lpnc->iBorderWidth, 50);
01123
01124
01125
01126
01127 lpnc->iScrollWidth =
max(lpnc->iScrollWidth, cxEdge4);
01128 lpnc->iScrollHeight =
max(lpnc->iScrollHeight, 4 *
SYSMET(CYEDGE));
01129
01130
01131
01132
01133
01134
01135
01136 lpnc->iCaptionWidth =
max(lpnc->iCaptionWidth, cxEdge4);
01137 lpnc->iCaptionHeight =
max(lpnc->iCaptionHeight,
gcyCaptionFontChar +
SYSMET(CYEDGE));
01138
01139
01140
01141
01142
01143
01144
01145 lpnc->iSmCaptionWidth =
max(lpnc->iSmCaptionWidth, cxEdge4);
01146 lpnc->iSmCaptionHeight =
max(lpnc->iSmCaptionHeight,
gcySmCaptionFontChar +
SYSMET(CYEDGE));
01147
01148
01149
01150
01151
01152 lpnc->iMenuWidth =
max(lpnc->iMenuWidth, cxEdge4);
01153 lpnc->iMenuHeight =
max(lpnc->iMenuHeight,
gcyMenuFontChar +
gcyMenuFontExternLeading +
SYSMET(CYEDGE));
01154
01155
01156
01157
01158
SetNCMetrics(lpnc);
01159 }
01160
01161
if (!
CreateBitmapStrip()) {
01162 RIPMSG0(RIP_WARNING,
"CreateBitmapStrip failed");
01163
return FALSE;
01164 }
01165
01166
return TRUE;
01167 }
01168
01169
01170 VOID SetMinMetrics(
01171 PUNICODE_STRING pProfileUserName,
01172 LPMINIMIZEDMETRICS lpmin)
01173 {
01174 MINIMIZEDMETRICS
min;
01175
01176
if (!lpmin) {
01177
01178
01179
01180
01181
min.iWidth =
MetricGetID(pProfileUserName,STR_MINWIDTH, 154);
01182
min.iHorzGap =
MetricGetID(pProfileUserName,STR_MINHORZGAP, 0);
01183
min.iVertGap =
MetricGetID(pProfileUserName,STR_MINVERTGAP, 0);
01184
min.iArrange =
MetricGetID(pProfileUserName,STR_MINARRANGE, ARW_BOTTOMLEFT | ARW_RIGHT);
01185 lpmin = &
min;
01186 }
01187
01188
01189
01190
01191
01192
01193
01194
01195
01196 lpmin->iWidth =
max(lpmin->iWidth, 0);
01197 lpmin->iHorzGap =
max(lpmin->iHorzGap, 0);
01198 lpmin->iVertGap =
max(lpmin->iVertGap, 0);
01199 lpmin->iArrange &= ARW_VALID;
01200
01201
01202
01203
01204
SYSMET(CXMINIMIZED) = 2*
SYSMET(CXFIXEDFRAME) + (
int) lpmin->iWidth;
01205
SYSMET(CYMINIMIZED) = 2*
SYSMET(CYFIXEDFRAME) +
SYSMET(CYSIZE);
01206
01207
SYSMET(CXMINSPACING) =
SYSMET(CXMINIMIZED) + (
int) lpmin->iHorzGap;
01208
SYSMET(CYMINSPACING) =
SYSMET(CYMINIMIZED) + (
int) lpmin->iVertGap;
01209
01210
SYSMET(ARRANGE) = (
int) lpmin->iArrange;
01211 }
01212
01213 BOOL SetIconMetrics(
01214 PUNICODE_STRING pProfileUserName,
01215 LPICONMETRICS lpicon)
01216 {
01217 ICONMETRICS icon;
01218
01219
if (!
SetIconFonts(pProfileUserName,lpicon)) {
01220 RIPMSG0(RIP_WARNING,
"SetIconMetrics failed in SetIconFonts");
01221
return FALSE;
01222 }
01223
01224
if (!lpicon) {
01225
01226 icon.iTitleWrap =
MetricGetID(pProfileUserName,
01227 STR_ICONTITLEWRAP,
TRUE);
01228
01229 icon.iHorzSpacing =
MetricGetID(pProfileUserName,
01230 STR_ICONHORZSPACING,
01231 (GreGetDeviceCaps(
HDCBITS(), LOGPIXELSX) * 75) / 96);
01232
01233 icon.iVertSpacing =
MetricGetID(pProfileUserName,
01234 STR_ICONVERTSPACING,
01235 (GreGetDeviceCaps(
HDCBITS(), LOGPIXELSY) * 75) / 96);
01236
01237 lpicon = &icon;
01238 }
01239
01240
01241
01242
01243 lpicon->iHorzSpacing =
max(lpicon->iHorzSpacing, (
int)
SYSMET(CXICON));
01244 lpicon->iVertSpacing =
max(lpicon->iVertSpacing, (
int)
SYSMET(CYICON));
01245
01246
SYSMET(CXICONSPACING) = (
int) lpicon->iHorzSpacing;
01247
SYSMET(CYICONSPACING) = (
int) lpicon->iVertSpacing;
01248
SET_OR_CLEAR_PUDF(
PUDF_ICONTITLEWRAP, lpicon->iTitleWrap);
01249
01250
return TRUE;
01251 }
01252
01253
01254
01255
01256
01257
01258
01259
01260
01261
01262 UINT xxxMB_FindLongestString(HDC hdc)
01263 {
01264
UINT wRetVal;
01265
int i, iMaxLen = 0, iNewMaxLen;
01266 LPWSTR pszCurStr, szMaxStr;
01267 SIZE sizeOneChar;
01268 SIZE sizeMaxStr;
01269
PTHREADINFO ptiCurrent =
PtiCurrentShared();
01270
01271
for (i = 0; i <
MAX_SEB_STYLES; i++) {
01272 pszCurStr =
GETGPSIMBPSTR(i);
01273
if ((iNewMaxLen = wcslen(pszCurStr)) > iMaxLen) {
01274 iMaxLen = iNewMaxLen;
01275 szMaxStr = pszCurStr;
01276 }
01277 }
01278
01279
01280
01281
01282
if (
CALL_LPK(ptiCurrent)) {
01283
xxxClientGetTextExtentPointW(hdc, (PWSTR)
szOneChar, 1, &sizeOneChar);
01284 }
else {
01285 GreGetTextExtentW(hdc, (PWSTR)
szOneChar, 1, &sizeOneChar, GGTE_WIN3_EXTENT);
01286 }
01287
xxxPSMGetTextExtent(hdc, szMaxStr, iMaxLen, &sizeMaxStr);
01288 wRetVal = (
UINT)(sizeMaxStr.cx + (sizeOneChar.cx * 2));
01289
01290
return wRetVal;
01291 }