|
|
1.1 root 1: // showfont.cpp : Defines the behavior of the major classes of ShowFont.
2: // ShowFont is a simple Windows font parameter viewing and
3: // modifying utility program.
4: //
5: // This is a part of the Microsoft Foundation Classes C++ library.
6: // Copyright (C) 1992 Microsoft Corporation
7: // All rights reserved.
8: //
9: // This source code is only intended as a supplement to the
10: // Microsoft Foundation Classes Reference and Microsoft
11: // QuickHelp documentation provided with the library.
12: // See these sources for detailed information regarding the
13: // Microsoft Foundation Classes product.
14:
15: #include "showfont.h"
16:
17: /////////////////////////////////////////////////////////////////////////////
18: // definition of common globals
19:
20: CFont* pTheFont; // current font
21: CFont* myFont; // created font
22: CFont systemFont;
23:
24: char outputText[4][64];
25: int nLineSpace;
26:
27: CPoint ptCurrent(0, 0);
28: short nBkMode = OPAQUE;
29: short nAlignLCR = TA_LEFT;
30: short nAlignTBB = TA_TOP;
31: char szAppName[] = "ShowFont Sample Application Font: ";
32: char szWindowTitle[80];
33:
34: // default color values
35: DWORD rgbTextColor = ::GetSysColor(COLOR_WINDOWTEXT);
36: DWORD rgbBkColor = ::GetSysColor(COLOR_WINDOW);
37:
38: /////////////////////////////////////////////////////////////////////////////
39: // Main application initialization.
40:
41: CShowFontApp theApp;
42:
43: BOOL CShowFontApp::InitInstance()
44: {
45: // Create the main window. The caption includes the font name, SYSTEM.
46: //
47: strcpy(szWindowTitle, szAppName);
48: strcat(szWindowTitle, "SYSTEM");
49: m_pMainWnd = new CMainWindow(szWindowTitle);
50:
51: // Make the window visible; update its client area; and return "success".
52: //
53: m_pMainWnd->ShowWindow(m_nCmdShow);
54: m_pMainWnd->UpdateWindow();
55: return TRUE;
56: }
57:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.