|
|
1.1 root 1: /**************************************************************************\
2: * dialogs.c -- module for the two dialogs (LOGFONT & TEXTMETRIC)
3: * Includes the window procedure and an initialization routine.
1.1.1.2 ! root 4: *
! 5: * Steve Firebaugh
! 6: * Microsoft Developer Support
! 7: * Copyright (c) 1992 Microsoft Corporation
! 8: *
! 9: * the LogFontWndProc is actually used for multiple dialogs.
1.1 root 10: *
11: \**************************************************************************/
1.1.1.2 ! root 12: #define UNICODE
1.1 root 13:
14: #include <windows.h>
15: #include <string.h>
1.1.1.2 ! root 16: #include <stdio.h>
1.1 root 17: #include "ntfonts.h"
18:
19:
20:
21: int initDlg(HWND hwndMain)
22: {
1.1.1.2 ! root 23: /* load three dialogs and position them. Set the minimize icon for
! 24: * this CLASS and it affects all dialog windows.
! 25: */
! 26:
! 27: hwndDlgLF = CreateDialog (hInst, TEXT("logfontDlg"), hwndMain,
! 28: (DLGPROC)LogFontWndProc);
! 29: if (hwndDlgLF == NULL) return FALSE;
! 30:
! 31: SetWindowPos (hwndDlgLF, NULL,
! 32: CHILDLEFT(1), CHILDTOP,
! 33: 0,0, SWP_NOZORDER | SWP_NOSIZE);
! 34:
! 35:
! 36: hwndDlgTM = CreateDialog (hInst, TEXT("textmetricDlg"), hwndMain,
1.1 root 37: (DLGPROC)LogFontWndProc);
38: if (hwndDlgTM == NULL) return FALSE;
39:
40: SetWindowPos (hwndDlgTM, NULL,
41: CHILDLEFT(0), CHILDTOP,
42: 0,0, SWP_NOZORDER | SWP_NOSIZE);
43:
44:
45:
1.1.1.2 ! root 46: hwndDlgOLTM = CreateDialog (hInst, TEXT("oltextmetricDlg"), hwndMain,
1.1 root 47: (DLGPROC)LogFontWndProc);
1.1.1.2 ! root 48: if (hwndDlgOLTM == NULL) return FALSE;
! 49: ShowWindow (hwndDlgOLTM, SW_MINIMIZE);
! 50:
! 51:
! 52:
! 53:
! 54: hwndDlgFD = CreateDialog (hInst, TEXT("getfontdataDlg"), hwndMain,
! 55: (DLGPROC)FontDataWndProc);
! 56: if (hwndDlgFD == NULL) return FALSE;
! 57: ShowWindow (hwndDlgFD, SW_MINIMIZE);
! 58: SetWindowPos (hwndDlgFD, HWND_TOP,
! 59: 0, 0,
! 60: 0,0, SWP_NOSIZE );
! 61:
1.1 root 62:
63:
1.1.1.2 ! root 64: SetClassLong (hwndDlgLF, GCL_HICON, (LONG)LoadIcon(hInst, TEXT("ntfontsIcon")));
1.1 root 65:
66:
67: return TRUE;
68: }
69:
70:
1.1.1.2 ! root 71: /* first and last string IDs from string table in RC file */
! 72: #define FIRSTSTRING 1
! 73: #define LASTSTRING 20
! 74:
! 75:
! 76:
! 77: /**************************************************************************\
! 78: *
! 79: * function: FontDataWndProc
! 80: *
! 81: * input parameters: normal window procedure parameters.
! 82: *
! 83: * Allow the user to select a table, an offset, and a byte count.
! 84: * on command message, post self a user message (allows the user
! 85: * message to come in from other sources too). On the user message,
! 86: * just call GetFontData and display the results.
! 87: *
! 88: *
! 89: // UNICODE NOTICE
! 90: // Parts of this are held as ANSI because the dwTable
! 91: // in the fontdata is stored with four 8 bit chars.
! 92: // And because there is not yet a wide char version of sscanf().
! 93: *
! 94: *
! 95: \**************************************************************************/
! 96: LRESULT CALLBACK FontDataWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
! 97: {
! 98: #define NCHAR 255
! 99: TCHAR buffer[NCHAR];
! 100: HDC hdc;
! 101: int nBytes, nStrings, i;
! 102:
! 103:
! 104: switch (message) {
! 105:
! 106: /* fill combo box w/ table names, and
! 107: * entry fields w/ meaningful initial values.
! 108: */
! 109: case WM_INITDIALOG:
! 110: SetDlgItemInt (hwnd, DID_DWOFFSET, 0, TRUE);
! 111: SetDlgItemInt (hwnd, DID_CBDATA, 50, TRUE);
! 112: for (i = FIRSTSTRING; i<= LASTSTRING; i++) {
! 113: LoadString (GetModuleHandle (NULL), i, buffer, NCHAR);
! 114: SendDlgItemMessage (hwnd, DID_DWTABLE, CB_ADDSTRING, 0, (LPARAM)buffer);
! 115: }
! 116:
! 117: return TRUE;
! 118:
! 119: /* If the user hits the DOIT button, post message back to the
! 120: * main window. It will get an HDC and then post us the proper
! 121: * user message.
! 122: */
! 123: case WM_COMMAND:
! 124: if (wParam == DID_DOIT)
! 125: PostMessage (hwndMain, WM_COMMAND, TBID_GETFONTDATA, 0);
! 126: break; /* end WM_COMMAND */
! 127:
! 128:
! 129:
! 130: /**********************************************************************\
! 131: * WMU_GETFONTDATA
! 132: *
! 133: * lParam - HDC.
! 134: *
! 135: * User message. Parse the contents of the entry fields, and make the
! 136: * GetFontData() call. Put results in the listbox.
! 137: \**********************************************************************/
! 138: case WMU_GETFONTDATA: {
! 139: DWORD dwTable, dwOffset, cbData;
! 140: LPBYTE lpDataBuffer;
! 141: DWORD dwNBytes;
! 142:
! 143: hdc = (HDC) lParam;
! 144: SendDlgItemMessage (hwnd, DID_LISTBOX, LB_RESETCONTENT, 0, 0);
! 145:
! 146:
! 147: {
! 148: // UNICODE NOTICE. GetDlgItemTextA returns ANSI strings.
! 149: // we are doing manipulation on a byte by byte basis
! 150:
! 151: CHAR fourbytes[5];
! 152: CHAR sbBuffer[NCHAR];
! 153:
! 154: nBytes = GetDlgItemTextA (hwnd, DID_DWTABLE, fourbytes, 5);
! 155: if (nBytes == 0) {
! 156: dwTable = 0;
! 157: } else {
! 158: dwTable = (DWORD) ((fourbytes[0] << 24)
! 159: + (fourbytes[1] << 16)
! 160: + (fourbytes[2] << 8)
! 161: + (fourbytes[3]));
! 162: }
! 163:
! 164:
! 165: // UNICODE NOTICE. GetDlgItemTextA returns ANSI strings.
! 166: // sscanf expects single byte strings.
! 167:
! 168: GetDlgItemTextA (hwnd, DID_DWOFFSET, sbBuffer, NCHAR);
! 169: sscanf (sbBuffer, "%x", &dwOffset);
! 170: GetDlgItemTextA (hwnd, DID_CBDATA , sbBuffer, NCHAR);
! 171: sscanf (sbBuffer, "%x", &cbData);
! 172: }
! 173:
! 174:
! 175: lpDataBuffer = (LPBYTE) LocalAlloc (LPTR, cbData);
! 176: if (lpDataBuffer == NULL) {
! 177: MessageBox (NULL, TEXT("alloc failed"), MBERROR, MBERRORFLAGS);
! 178: return NULL;
! 179: }
! 180:
! 181: dwNBytes = GetFontData (hdc, dwTable, dwOffset, (LPVOID) lpDataBuffer, cbData);
! 182:
! 183: if (dwNBytes == -1) {
! 184: MessageBox (NULL, MBGETFONTDATAERR, MBERROR, MBERRORFLAGS);
! 185: } else {
! 186:
! 187: nStrings = dwNBytes / 16;
! 188: for (i = 0; i< nStrings; i++) {
! 189: wsprintf (buffer,
! 190: TEXT("%02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x"),
! 191: (int)lpDataBuffer[i*16+0],
! 192: (int)lpDataBuffer[i*16+1],
! 193: (int)lpDataBuffer[i*16+2],
! 194: (int)lpDataBuffer[i*16+3],
! 195: (int)lpDataBuffer[i*16+4],
! 196: (int)lpDataBuffer[i*16+5],
! 197: (int)lpDataBuffer[i*16+6],
! 198: (int)lpDataBuffer[i*16+7],
! 199: (int)lpDataBuffer[i*16+8],
! 200: (int)lpDataBuffer[i*16+9],
! 201: (int)lpDataBuffer[i*16+10],
! 202: (int)lpDataBuffer[i*16+11],
! 203: (int)lpDataBuffer[i*16+12],
! 204: (int)lpDataBuffer[i*16+13],
! 205: (int)lpDataBuffer[i*16+14],
! 206: (int)lpDataBuffer[i*16+15]);
! 207: SendDlgItemMessage (hwnd, DID_LISTBOX, LB_ADDSTRING, 0, (LONG) buffer);
! 208: }
! 209: }
! 210:
! 211: LocalFree ( LocalHandle ((LPVOID)lpDataBuffer));
! 212: } return TRUE; /* end WMU_GETFONTDATA */
! 213:
! 214: } /* end switch */
! 215: return (NULL);
! 216: }
! 217:
! 218:
! 219:
! 220:
! 221:
1.1 root 222:
223: /**************************************************************************\
224: *
225: * function: LogFontWndProc
226: *
227: * input parameters: normal window procedure parameters.
228: * global variables:
229: *
230: * This window procedure is used for two completely different dialog boxes.
231: \**************************************************************************/
1.1.1.2 ! root 232: LRESULT CALLBACK LogFontWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
1.1 root 233: {
234: static LPLOGFONT lplf;
235: static LPTEXTMETRIC lptm;
236:
237: switch (message) {
238:
239:
240: /**********************************************************************\
241: * WMU_DEMOTOLF
242: *
243: * lParam - pointer to LOGFONT structure.
244: *
245: * User message. Take the input LOGFONT and fill the edit fields of the
246: * dialog box.
247: \**********************************************************************/
248: case WMU_DEMOTOLF: {
249: lplf = (LPLOGFONT) lParam;
250:
251: SetDlgItemInt (hwnd, DIDHEIGHT , lplf->lfHeight, FALSE);
252: SetDlgItemInt (hwnd, DIDHEIGHT , lplf->lfHeight, FALSE);
253: SetDlgItemInt (hwnd, DIDWIDTH , lplf->lfWidth, FALSE);
254: SetDlgItemInt (hwnd, DIDESCAPE , lplf->lfEscapement, FALSE);
255: SetDlgItemInt (hwnd, DIDORIENT , lplf->lfOrientation, FALSE);
256: SetDlgItemInt (hwnd, DIDWEIGHT , lplf->lfWeight, FALSE);
257: SetDlgItemInt (hwnd, DIDITALIC , lplf->lfItalic, FALSE);
258: SetDlgItemInt (hwnd, DIDUNDERL , lplf->lfUnderline, FALSE);
259: SetDlgItemInt (hwnd, DIDSTRIKE , lplf->lfStrikeOut, FALSE);
260: SetDlgItemInt (hwnd, DIDCHARSE , lplf->lfCharSet, FALSE);
261: SetDlgItemInt (hwnd, DIDOUTPRE , lplf->lfOutPrecision, FALSE);
262: SetDlgItemInt (hwnd, DIDCLIPPR , lplf->lfClipPrecision, FALSE);
263: SetDlgItemInt (hwnd, DIDQUALIT , lplf->lfQuality, FALSE);
264: SetDlgItemInt (hwnd, DIDPITCHA , lplf->lfPitchAndFamily,FALSE);
265: SetDlgItemText (hwnd, DIDFACENA, lplf->lfFaceName);
266:
267: } break;
268:
269:
270: /**********************************************************************\
271: * WMU_LFTODEMO
272: *
273: * lParam - pointer to LOGFONT structure.
274: *
275: * User message. Fill the input LOGFONT with the contents of the
276: * edit fields of dialog box.
277: \**********************************************************************/
278: case WMU_LFTODEMO: {
279: BOOL success;
280: lplf = (LPLOGFONT) lParam;
281:
282:
283: lplf->lfHeight = GetDlgItemInt (hwnd, DIDHEIGHT, &success , FALSE);
284: lplf->lfHeight = GetDlgItemInt (hwnd, DIDHEIGHT, &success , FALSE);
285: lplf->lfWidth = GetDlgItemInt (hwnd, DIDWIDTH , &success , FALSE);
286: lplf->lfEscapement = GetDlgItemInt (hwnd, DIDESCAPE, &success , FALSE);
287: lplf->lfOrientation = GetDlgItemInt (hwnd, DIDORIENT, &success , FALSE);
288: lplf->lfWeight = GetDlgItemInt (hwnd, DIDWEIGHT, &success , FALSE);
289: lplf->lfItalic = (BYTE) GetDlgItemInt (hwnd, DIDITALIC, &success , FALSE);
290: lplf->lfUnderline = (BYTE) GetDlgItemInt (hwnd, DIDUNDERL, &success , FALSE);
291: lplf->lfStrikeOut = (BYTE) GetDlgItemInt (hwnd, DIDSTRIKE, &success , FALSE);
292: lplf->lfCharSet = (BYTE) GetDlgItemInt (hwnd, DIDCHARSE, &success , FALSE);
293: lplf->lfOutPrecision = (BYTE) GetDlgItemInt (hwnd, DIDOUTPRE, &success , FALSE);
294: lplf->lfClipPrecision = (BYTE) GetDlgItemInt (hwnd, DIDCLIPPR, &success , FALSE);
295: lplf->lfQuality = (BYTE) GetDlgItemInt (hwnd, DIDQUALIT, &success , FALSE);
296: lplf->lfPitchAndFamily =(BYTE) GetDlgItemInt (hwnd, DIDPITCHA, &success , FALSE);
297: GetDlgItemText (hwnd, DIDFACENA, lplf->lfFaceName, LF_FACESIZE);
298:
299: } break;
300:
301:
302:
303: /**********************************************************************\
304: * WMU_DEMOTOTM
305: *
306: * lParam - pointer to TEXTMETRIC structure.
307: *
308: * User message. Take the input LOGFONT and fill the list box with
309: * strings. Turn off update before hand, then reenable when complete.
310: \**********************************************************************/
311: case WMU_DEMOTOTM: {
1.1.1.2 ! root 312: TCHAR buffer[100];
1.1 root 313:
314: lptm = (LPTEXTMETRIC) lParam;
315:
316: SendDlgItemMessage (hwnd, DID_LISTBOX, WM_SETREDRAW, FALSE, 0);
317: SendDlgItemMessage (hwnd, DID_LISTBOX, LB_RESETCONTENT, 0, 0);
318:
1.1.1.2 ! root 319: #define LBPUT SendDlgItemMessage (hwnd, DID_LISTBOX, LB_ADDSTRING, 0, (LONG) buffer);
! 320:
! 321: wsprintf (buffer, TEXT("tmHeight \t%d") ,(int) lptm->tmHeight ); LBPUT
! 322: wsprintf (buffer, TEXT("tmAscent \t%d") ,(int) lptm->tmAscent ); LBPUT
! 323: wsprintf (buffer, TEXT("tmDescent \t%d") ,(int) lptm->tmDescent ); LBPUT
! 324: wsprintf (buffer, TEXT("tmInternalLeading\t%d") ,(int) lptm->tmInternalLeading ); LBPUT
! 325: wsprintf (buffer, TEXT("tmExternalLeading\t%d") ,(int) lptm->tmExternalLeading ); LBPUT
! 326: wsprintf (buffer, TEXT("tmAveCharWidth \t%d") ,(int) lptm->tmAveCharWidth ); LBPUT
! 327: wsprintf (buffer, TEXT("tmMaxCharWidth \t%d") ,(int) lptm->tmMaxCharWidth ); LBPUT
! 328: wsprintf (buffer, TEXT("tmWeight \t%d") ,(int) lptm->tmWeight ); LBPUT
! 329: wsprintf (buffer, TEXT("tmOverhang \t%d") ,(int) lptm->tmOverhang ); LBPUT
! 330: wsprintf (buffer, TEXT("tmDigitizedAspectX\t%d"),(int) lptm->tmDigitizedAspectX ); LBPUT
! 331: wsprintf (buffer, TEXT("tmDigitizedAspectY\t%d"),(int) lptm->tmDigitizedAspectY ); LBPUT
! 332: wsprintf (buffer, TEXT("tmItalic \t%d") ,(int) lptm->tmItalic ); LBPUT
! 333: wsprintf (buffer, TEXT("tmUnderlined \t%d") ,(int) lptm->tmUnderlined ); LBPUT
! 334: wsprintf (buffer, TEXT("tmStruckOut \t%d") ,(int) lptm->tmStruckOut ); LBPUT
! 335: wsprintf (buffer, TEXT("tmFirstChar \t%d") ,(int) lptm->tmFirstChar ); LBPUT
! 336: wsprintf (buffer, TEXT("tmLastChar \t%d") ,(int) lptm->tmLastChar ); LBPUT
! 337: wsprintf (buffer, TEXT("tmDefaultChar \t%d") ,(int) lptm->tmDefaultChar ); LBPUT
! 338: wsprintf (buffer, TEXT("tmBreakChar \t%d") ,(int) lptm->tmBreakChar ); LBPUT
! 339: wsprintf (buffer, TEXT("tmPitchAndFamily\t%d") ,(int) lptm->tmPitchAndFamily ); LBPUT
! 340: wsprintf (buffer, TEXT("tmCharSet \t%d") ,(int) lptm->tmCharSet ); LBPUT
1.1 root 341:
342: SendDlgItemMessage (hwnd, DID_LISTBOX, WM_SETREDRAW, TRUE, 0);
343: InvalidateRect (hwnd, NULL, TRUE);
344: UpdateWindow (hwnd);
345:
346: } break;
347:
348:
1.1.1.2 ! root 349: /**********************************************************************\
! 350: * WMU_DEMOTOOLTM
! 351: *
! 352: * lParam - HDC.
! 353: *
! 354: * User message. With the input HDC, allocate space for OUTLINETEXTMETRIC
! 355: * structure, query it from the HDC, and fill the listbox. (Allocate the
! 356: * OUTLINETEXTMETRIC structure dynamically since it is variable size.)
! 357: \**********************************************************************/
! 358: case WMU_DEMOTOOLTM: {
! 359: HDC hdc;
! 360: TCHAR buffer[100];
! 361: UINT cbData;
! 362: LPOUTLINETEXTMETRIC lpoltm;
! 363:
! 364: hdc = (HDC) lParam;
! 365:
! 366:
! 367: /* figure out how large the structure is, alloc, and re-query
! 368: * unless cbData ==0, then post no-op string and exit.
! 369: */
! 370: cbData = GetOutlineTextMetrics (hdc, 0, NULL);
! 371: if (cbData == 0) {
! 372: SendDlgItemMessage (hwnd, DID_LISTBOX, LB_RESETCONTENT, 0, 0);
! 373: wsprintf (buffer, TEXT("cbData == 0")); LBPUT
! 374: return NULL;
! 375: }
! 376: lpoltm = (LPOUTLINETEXTMETRIC)LocalAlloc (LPTR, cbData);
! 377: GetOutlineTextMetrics (hdc, cbData, lpoltm);
! 378:
! 379:
! 380: /* freeze redraw of listbox, and clear contents. */
! 381: SendDlgItemMessage (hwnd, DID_LISTBOX, WM_SETREDRAW, FALSE, 0);
! 382: SendDlgItemMessage (hwnd, DID_LISTBOX, LB_RESETCONTENT, 0, 0);
! 383:
! 384:
! 385: wsprintf (buffer, TEXT("otmSize \t%d"),(int) lpoltm->otmSize ); LBPUT
! 386: wsprintf (buffer, TEXT("otmTextMetrics { }")); LBPUT
! 387: wsprintf (buffer, TEXT("otmFiller \t%d"),(int)(BYTE) lpoltm->otmFiller ); LBPUT
! 388:
! 389: wsprintf (buffer, TEXT("otmPanoseNumber ")); LBPUT
! 390: wsprintf (buffer, TEXT("\t ulCulture \t%d"), (int) lpoltm->otmPanoseNumber.ulCulture ); LBPUT
! 391: wsprintf (buffer, TEXT("\t bFamilyType \t0x%lx"),(int) lpoltm->otmPanoseNumber.bFamilyType ); LBPUT
! 392: wsprintf (buffer, TEXT("\t bSerifStyle \t0x%lx"),(int) lpoltm->otmPanoseNumber.bSerifStyle ); LBPUT
! 393: wsprintf (buffer, TEXT("\t bWeight \t0x%lx"),(int) lpoltm->otmPanoseNumber.bWeight ); LBPUT
! 394: wsprintf (buffer, TEXT("\t bProportion \t0x%lx"),(int) lpoltm->otmPanoseNumber.bProportion ); LBPUT
! 395: wsprintf (buffer, TEXT("\t bContrast \t0x%lx"),(int) lpoltm->otmPanoseNumber.bContrast ); LBPUT
! 396: wsprintf (buffer, TEXT("\t bStrokeVariation \t0x%lx"),(int) lpoltm->otmPanoseNumber.bStrokeVariation ); LBPUT
! 397: wsprintf (buffer, TEXT("\t bArmStyle \t0x%lx"),(int) lpoltm->otmPanoseNumber.bArmStyle ); LBPUT
! 398: wsprintf (buffer, TEXT("\t bLetterform \t0x%lx"),(int) lpoltm->otmPanoseNumber.bLetterform ); LBPUT
! 399: wsprintf (buffer, TEXT("\t bMidline \t0x%lx"),(int) lpoltm->otmPanoseNumber.bMidline ); LBPUT
! 400: wsprintf (buffer, TEXT("\t bXHeight \t0x%lx"),(int) lpoltm->otmPanoseNumber.bXHeight ); LBPUT
! 401:
! 402:
! 403: wsprintf (buffer, TEXT("otmfsSelection \t%d"),(UINT) lpoltm->otmfsSelection ); LBPUT
! 404: wsprintf (buffer, TEXT("otmfsType \t%d"),(UINT) lpoltm->otmfsType ); LBPUT
! 405: wsprintf (buffer, TEXT("otmsCharSlopeRise \t%d"),(UINT) lpoltm->otmsCharSlopeRise ); LBPUT
! 406: wsprintf (buffer, TEXT("otmsCharSlopeRun \t%d"),(UINT) lpoltm->otmsCharSlopeRun ); LBPUT
! 407: wsprintf (buffer, TEXT("otmItalicAngle \t%d"),(UINT) lpoltm->otmItalicAngle ); LBPUT
! 408: wsprintf (buffer, TEXT("otmEMSquare \t%d"),(UINT) lpoltm->otmEMSquare ); LBPUT
! 409: wsprintf (buffer, TEXT("otmAscent \t%d"),(UINT) lpoltm->otmAscent ); LBPUT
! 410: wsprintf (buffer, TEXT("otmDescent \t%d"),(int) lpoltm->otmDescent ); LBPUT
! 411: wsprintf (buffer, TEXT("otmLineGap \t%d"),(int) lpoltm->otmLineGap ); LBPUT
! 412: wsprintf (buffer, TEXT("otmsCapEmHeight \t%d"),(UINT) lpoltm->otmsCapEmHeight ); LBPUT
! 413: wsprintf (buffer, TEXT("otmsXHeight \t%d"),(UINT) lpoltm->otmsXHeight ); LBPUT
! 414: wsprintf (buffer, TEXT("otmrcFontBox \t (%d, %d, %d, %d)"),
! 415: (int) lpoltm->otmrcFontBox.left,
! 416: (int) lpoltm->otmrcFontBox.top,
! 417: (int) lpoltm->otmrcFontBox.right,
! 418: (int) lpoltm->otmrcFontBox.bottom ); LBPUT
! 419: wsprintf (buffer, TEXT("otmMacAscent \t%d"),(int) lpoltm->otmMacAscent ); LBPUT
! 420: wsprintf (buffer, TEXT("otmMacDescent \t%d"),(int) lpoltm->otmMacDescent ); LBPUT
! 421: wsprintf (buffer, TEXT("otmMacLineGap \t%d"),(UINT) lpoltm->otmMacLineGap ); LBPUT
! 422: wsprintf (buffer, TEXT("otmusMinimumPPEM \t%d"),(UINT) lpoltm->otmusMinimumPPEM ); LBPUT
! 423:
! 424: wsprintf (buffer, TEXT("otmptSubscriptSize \t(%d, %d)"),
! 425: (int) lpoltm->otmptSubscriptSize.x,
! 426: (int) lpoltm->otmptSubscriptSize.y ); LBPUT
! 427: wsprintf (buffer, TEXT("otmptSubscriptOffset \t(%d, %d)"),
! 428: (int) lpoltm->otmptSubscriptOffset.x,
! 429: (int) lpoltm->otmptSubscriptOffset.y ); LBPUT
! 430: wsprintf (buffer, TEXT("otmptSuperscriptSize \t(%d, %d)"),
! 431: (int) lpoltm->otmptSuperscriptSize.x,
! 432: (int) lpoltm->otmptSuperscriptSize.y ); LBPUT
! 433: wsprintf (buffer, TEXT("otmptSuperscriptOffset \t(%d, %d)"),
! 434: (int) lpoltm->otmptSuperscriptOffset.x,
! 435: (int) lpoltm->otmptSuperscriptOffset.y); LBPUT
! 436:
! 437: wsprintf (buffer, TEXT("otmsStrikeoutSize \t%d"),(UINT) lpoltm->otmsStrikeoutSize ); LBPUT
! 438: wsprintf (buffer, TEXT("otmsStrikeoutPosition \t%d"),(int) lpoltm->otmsStrikeoutPosition ); LBPUT
! 439: wsprintf (buffer, TEXT("otmsUnderscoreSize \t%d"),(int) lpoltm->otmsUnderscoreSize ); LBPUT
! 440: wsprintf (buffer, TEXT("otmsUnderscorePosition \t%d"),(UINT) lpoltm->otmsUnderscorePosition); LBPUT
! 441:
! 442: /***** Removed because it is TRAPPING as of 10/1/92. Should work...
! 443: wsprintf (buffer, TEXT("otmpFamilyName: %s"),(LPCTSTR) (lpoltm + (size_t)lpoltm->otmpFamilyName)); LBPUT
! 444: wsprintf (buffer, TEXT("otmpFaceName: %s"),(LPCTSTR) (lpoltm + (size_t)lpoltm->otmpFaceName)); LBPUT
! 445: wsprintf (buffer, TEXT("otmpStyleName: %s"),(LPCTSTR) (lpoltm + (size_t)lpoltm->otmpStyleName)); LBPUT
! 446: wsprintf (buffer, TEXT("otmpFullName:")); LBPUT
! 447: wsprintf (buffer, TEXT(" %s"),(LPCTSTR) (lpoltm + (size_t)lpoltm->otmpFullName)); LBPUT
! 448: *****/
! 449:
! 450:
! 451:
! 452: SendDlgItemMessage (hwnd, DID_LISTBOX, WM_SETREDRAW, TRUE, 0);
! 453: InvalidateRect (hwnd, NULL, TRUE);
! 454: UpdateWindow (hwnd);
! 455:
! 456: /* balance LocalAlloc(), release memory. */
! 457: LocalFree (LocalHandle (lpoltm));
! 458:
! 459: } break;
! 460:
! 461:
! 462:
1.1 root 463: } /* end switch */
464: return (NULL);
465: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.