Annotation of mstools/samples/ntfonts/ntfonts.h, revision 1.1.1.2

1.1       root        1: /* ntf.h - header file
                      2: */
                      3: 
                      4: /* function prototypes, window procedures first. */
1.1.1.2 ! root        5: LRESULT CALLBACK MainWndProc    (HWND, UINT, WPARAM, LPARAM);
        !             6: LRESULT CALLBACK ToolBarWndProc (HWND, UINT, WPARAM, LPARAM);
        !             7: LRESULT CALLBACK AllFontsWndProc(HWND, UINT, WPARAM, LPARAM);
        !             8: LRESULT CALLBACK LogFontWndProc (HWND, UINT, WPARAM, LPARAM);
        !             9: LRESULT CALLBACK FontDataWndProc(HWND, UINT, WPARAM, LPARAM);
        !            10: LRESULT CALLBACK DisplayWndProc (HWND, UINT, WPARAM, LPARAM);
        !            11: LRESULT CALLBACK About (HWND, UINT, WPARAM, LPARAM);
        !            12: 
        !            13: 
1.1       root       14: 
                     15: /* the initialization routines for the different modules. */
                     16: int initDlg(HWND);
1.1.1.2 ! root       17: int initDisplay(HWND);
1.1       root       18: int initTB(HWND);
                     19: int initAllFont(HWND);
                     20: 
                     21: /* misc. routine to show data flow to the user. */
                     22: VOID flyWinWin(HWND, HWND, HWND, int);
                     23: 
1.1.1.2 ! root       24: 
        !            25: HDC      GetPrinterDC (VOID);
        !            26: 
1.1       root       27: /* the height of the toolbar in pels. */
1.1.1.2 ! root       28: #define TOOLBARHEIGHT 30
1.1       root       29: 
                     30: /* for the initial positioning of the three child windows. */
                     31: #define CHILDLEFT(x) (GetSystemMetrics (SM_CXFULLSCREEN) * x/3 + 5)
                     32: #define CHILDTOP     TOOLBARHEIGHT*6/5
                     33: 
1.1.1.2 ! root       34: /* the default size of some of the dialogs. */
        !            35: #define DLGWIDTH   110
        !            36: #define DLGHEIGHT  160
        !            37: 
        !            38: 
        !            39: 
        !            40: /* menu IDs */
        !            41: #define  IDM_CASCADE        1001
        !            42: #define  IDM_TILE           1002
        !            43: #define  IDM_ARRANGE        1003
        !            44: #define  IDM_HELP           2001
        !            45: #define  IDM_ABOUT          2002
1.1       root       46: 
1.1.1.2 ! root       47: #define  IDM_FLYWINWIN      2000
        !            48: #define  IDM_GRID           2001
1.1       root       49: 
                     50: 
                     51: /* dialog IDs from the LOGFONT dialog. */
                     52: #define  DID_X              101
                     53: #define  DIDHEIGHT          201
                     54: #define  DIDWIDTH           202
                     55: #define  DIDESCAPE          203
                     56: #define  DIDORIENT          204
                     57: #define  DIDWEIGHT          205
                     58: #define  DIDITALIC          206
                     59: #define  DIDUNDERL          207
                     60: #define  DIDSTRIKE          208
                     61: #define  DIDCHARSE          209
                     62: #define  DIDOUTPRE          210
                     63: #define  DIDCLIPPR          211
                     64: #define  DIDQUALIT          212
                     65: #define  DIDPITCHA          213
                     66: #define  DIDFACENA          214
                     67: 
                     68: /* dialog ID from the TEXTMETRIC dialog. */
                     69: #define DID_LISTBOX         500
                     70: 
1.1.1.2 ! root       71: /* dialog ID from the FontData dialog. */
        !            72: #define DID_DWTABLE         200
        !            73: #define DID_DWOFFSET        201
        !            74: #define DID_CBDATA          203
        !            75: #define DID_DOIT            300
        !            76: 
        !            77: 
        !            78: 
1.1       root       79: 
                     80: /* button window IDs from toolbar. */
                     81: #define TBID_ENUM     57
                     82: #define TBID_CREATE   58
                     83: #define TBID_GETTM    59
                     84: #define TBID_PRINT    60
1.1.1.2 ! root       85: #define TBID_GETFONTDATA 61
        !            86: #define IDM_PRINT     70
        !            87: 
1.1       root       88: 
                     89: 
                     90: /* USER messages used between windows. */
1.1.1.2 ! root       91: #define  WMU_LFTODEMO         WM_USER+0x1001
        !            92: #define  WMU_DEMOTOLF         WM_USER+0x1002
        !            93: #define  WMU_DEMOTOTM         WM_USER+0x1003
        !            94: #define  WMU_DEMOTOOLTM       WM_USER+0x1004
        !            95: #define  WMU_DEMOGETDC        WM_USER+0x1005
        !            96: #define  WMU_DEMORELEASEDC    WM_USER+0x1006
        !            97: #define  WMU_GETFONTDATA      WM_USER+0x1007
        !            98: #define  WMU_PREPAREALLGLYPHS WM_USER+0x1008
        !            99: 
        !           100: 
        !           101: #define  WMU_NEWFONT          WM_USER+0x1100
        !           102: #define  WMU_NEWMODEHELLO     WM_USER+0x1101
        !           103: #define  WMU_NEWMODETMRANGE   WM_USER+0x1102
        !           104: #define  WMU_NEWMODEALL       WM_USER+0x1103
        !           105: #define  WMU_NEWMODE_NEWSEG   WM_USER+0x1104
        !           106: #define  WMU_PRINT            WM_USER+0x1110
        !           107: 
        !           108: /* user defined create messsage, sent to window once CreateWindow() returns */
        !           109: #define WMU_CREATE          WM_USER+0x1000
        !           110: 
        !           111: 
        !           112: 
        !           113: 
        !           114: /* define strings and flags for use in warning message boxes */
        !           115: #define MBGETFONTDATAERR TEXT("Not a scalable font.")
        !           116: #define MBERROR          TEXT("Application Error.")
        !           117: #define MBERRORFLAGS     MB_OK | MB_ICONHAND
        !           118: 
        !           119: 
1.1       root      120: 
                    121: 
                    122: 
                    123: /* Global variables. */
                    124: HANDLE hInst;
1.1.1.2 ! root      125: HWND   hwndMain, hwndDisplay;
        !           126: HWND   hwndTB, hwndDlgLF, hwndDlgTM, hwndDlgOLTM, hwndDlgFD;
1.1       root      127: HWND   hwndDisplayFonts, hwndPrinterFonts;
1.1.1.2 ! root      128: HWND   hwndClient;
        !           129: 
        !           130: /* the display window works in one of 3 modes
        !           131:  *  this is shown to the user by a check mark in the 'Display' menu
        !           132:  *  it is stored internally in the following variable
        !           133:  *  (contains the checked menu ID)
        !           134:  */
        !           135: int gDisplaymode;
        !           136: #define  IDM_MODEHELLO          101
        !           137: #define  IDM_MODETMRANGE        102
        !           138: #define  IDM_MODEALL            103
        !           139: 
        !           140: 
        !           141: 
        !           142: 
        !           143: 
        !           144: // right out of the help files... generic string function macros
        !           145: 
        !           146: #ifdef UNICODE
        !           147: 
        !           148: #define CharStrCmp wcscmp
        !           149: #define CharStrnCmp wcsncmp
        !           150: #define CharStrCpy wcscpy
        !           151: #define CharStrLen wcslen
        !           152: 
        !           153: #else
        !           154: 
        !           155: #define CharStrCmp strcmp
        !           156: #define CharStrnCmp strncmp
        !           157: #define CharStrCpy strcpy
        !           158: #define CharStrLen strlen
1.1       root      159: 
1.1.1.2 ! root      160: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.