--- mstools/samples/fontview/dialogs.c 2018/08/09 18:21:54 1.1.1.3 +++ mstools/samples/fontview/dialogs.c 2018/08/09 18:24:03 1.1.1.4 @@ -1,3 +1,14 @@ + +/******************************************************************************\ +* This is a part of the Microsoft Source Code Samples. +* Copyright (C) 1993 Microsoft Corporation. +* All rights reserved. +* This source code is only intended as a supplement to +* Microsoft Development Tools and/or WinHelp documentation. +* See these sources for detailed information regarding the +* Microsoft samples programs. +\******************************************************************************/ + #define NOMINMAX #include #include "FontView.h" @@ -117,7 +128,7 @@ int FAR PASCAL DlgEnumFontNames (lpLogFo lpFontEnumProc = MakeProcInstance((FARPROC)DlgEnumFontSizes, hInst); if (lpFontEnumProc) { hdc = GetDC(hwnd); - EnumFonts (hdc, lpLogFont->lfFaceName, (FONTENUMPROC)lpFontEnumProc, (LPARAM)lpData); + EnumFonts (hdc, lpLogFont->lfFaceName, (FONTENUMPROC)lpFontEnumProc, (LPARAM)lpData); ReleaseDC(hwnd, hdc); FreeProcInstance (lpFontEnumProc); } else { @@ -403,17 +414,17 @@ static char szFacename[LF_FACESIZE]; *lplf = lfDlg; EndDialog(hwnd, TRUE); return (TRUE); - } else { - // We need to take a close look at the font verification - // code. Currently, it sometimes will report that the - // font didn't get properly selected, even if it did. - *lplf = lfDlg; + } else { + // We need to take a close look at the font verification + // code. Currently, it sometimes will report that the + // font didn't get properly selected, even if it did. + *lplf = lfDlg; EndDialog(hwnd, TRUE); - return (TRUE); + return (TRUE); - // This is what we want to do once we beef up the font - // verification code: - lfDlg = *lplf; + // This is what we want to do once we beef up the font + // verification code: + lfDlg = *lplf; MessageBox (GetFocus(), "Unable to re-create font from TextMetrics", "FontView", MB_OK); @@ -552,7 +563,7 @@ BOOL APIENTRY EnumDlgProc(HWND hwnd, UIN if (lpEnumFonts) { hdc = GetDC(hwnd); // The enumeration function will lock down the handle - EnumFonts (hdc, NULL, (FONTENUMPROC)lpEnumFonts, (LPARAM)&hFonts); + EnumFonts (hdc, NULL, (FONTENUMPROC)lpEnumFonts, (LPARAM)&hFonts); // The handle will come back to us properly unlocked ReleaseDC(hwnd, hdc); FreeProcInstance (lpEnumFonts); @@ -716,17 +727,17 @@ BOOL APIENTRY EnumDlgProc(HWND hwnd, UIN *lplf = lfDlg; //EndDialog(hwnd, TRUE); //return (TRUE); - } else { - // Again, font verification code is'nt quite up to - // snuff yet, so just Select the font anyway: - *lplf = lfDlg; - - // ...and this is what we want to do once we fix the - // font verification code: - //lfDlg = *lplf; - //MessageBox (GetFocus(), - // "Unable to re-create font from TextMetrics", - // "FontView", MB_OK); + } else { + // Again, font verification code is'nt quite up to + // snuff yet, so just Select the font anyway: + *lplf = lfDlg; + + // ...and this is what we want to do once we fix the + // font verification code: + //lfDlg = *lplf; + //MessageBox (GetFocus(), + // "Unable to re-create font from TextMetrics", + // "FontView", MB_OK); }