Annotation of mstools/samples/gdidemo/gdidemo.h, revision 1.1.1.1

1.1       root        1: /*---------------------------------------------------------------------------*\
                      2: | GDIDEMO HEADER FILE
                      3: |   This is the main header module for the application.
                      4: |
                      5: |
                      6: | created: 31-Oct-90
                      7: | history: 31-Oct-90 <chriswil> created.
                      8: |
                      9: \*---------------------------------------------------------------------------*/
                     10: 
                     11: #ifdef WIN16
                     12: #define APIENTRY FAR PASCAL
                     13: typedef int (APIENTRY *WNDPROC)();
                     14: typedef WORD WPARAM;
                     15: typedef VOID *PVOID;
                     16: typedef WORD UINT;
                     17: #else
                     18: typedef DWORD WPARAM;
                     19: #endif
                     20: 
                     21: 
                     22: #define APPCLASS   "GDIDEMO"
                     23: #define APPTITLE   "Windows GDI Demonstration"
                     24: 
                     25: 
                     26: #define APPMENU   1000
                     27: #define APPICON   1001
                     28: #define ABOUTBOX  1002
                     29: 
                     30: #define IDM_DEMO_POLYBEZIER 100
                     31: #define IDM_DEMO_XFORM      101
                     32: #define IDM_DEMO_MAZE       102
                     33: #define IDM_DEMO_DRAW       103
                     34: #define IDM_DEMO_BOUNCE     104
                     35: 
                     36: #define IDM_WINDOW_CASCADE  200
                     37: #define IDM_WINDOW_TILE     201
                     38: #define IDM_WINDOW_ICON     202
                     39: #define IDM_HELP_ABOUT      900
                     40: 
                     41: 
                     42: #define COLOR_SCALE_RED     1
                     43: #define COLOR_SCALE_GREEN   2
                     44: #define COLOR_SCALE_BLUE    3
                     45: #define COLOR_SCALE_GRAY    4
                     46: 
                     47: #define CLIENTWND           0
                     48: 
                     49: 
                     50: /*
                     51: ** MAIN WINDOW ROUTINES (gdidemo.c)
                     52: */
                     53: LONG  APIENTRY WndProc(HWND,UINT,WPARAM,LONG);
                     54: BOOL           CreateProc(HWND);
                     55: VOID           DestroyProc(HWND);
                     56: BOOL           CommandProc(HWND,WPARAM,LONG);
                     57: VOID           PaintProc(HWND);
                     58: DWORD FAR      lRandom(VOID);
                     59: 
                     60: 
                     61: /*
                     62: ** INITIALIZATION ROUTINES (init.c)
                     63: */
                     64: BOOL FAR RegisterAppClass(HANDLE);
                     65: VOID FAR UnregisterAppClass(HANDLE);
                     66: HWND FAR CreateAppWindow(HANDLE);
                     67: HWND FAR CreateMDIClientWindow(HWND);
                     68: 
                     69: 
                     70: 
                     71: /*
                     72: ** DIALOG ROUTINES (dialog.c)
                     73: */
                     74: BOOL APIENTRY AboutDlgProc(HWND,UINT,WPARAM,LONG);
                     75: int  FAR      DisplayDialogBox(HWND,LPSTR,WNDPROC,LONG);
                     76: VOID          PaintWindow(HWND,int);
                     77: HPALETTE      CreateColorScalePalette(HDC,int);
                     78: 
                     79: 
                     80: /*
                     81: ** WINDOW ROUTINES (wininfo.c)
                     82: */
                     83: BOOL  FAR AllocWindowInfo(HWND,WORD);
                     84: PVOID FAR LockWindowInfo(HWND);
                     85: BOOL  FAR UnlockWindowInfo(HWND);
                     86: BOOL  FAR FreeWindowInfo(HWND);
                     87: 
                     88: 
                     89: 
                     90: 
                     91: #ifdef TESTDEBUG
                     92: #define DEBUGOUT(lpszString) OutputDebugString(lpszString)
                     93: #else
                     94: #define DEBUGOUT(lpszString) {}
                     95: #endif
                     96: 
                     97: 
                     98: /*
                     99: ** Porting macros...
                    100: */
                    101: #ifdef WIN32
                    102: #define GETINSTANCE(hWnd)   (HANDLE)GetWindowLong(hWnd,GWL_HINSTANCE)
                    103: #define GETCLASSBRUSH(hWnd) (HBRUSH)GetClassLong(hWnd,GCL_HBRBACKGROUND)
                    104: #else
                    105: #define GETINSTANCE(hWnd)   (HANDLE)GetWindowWord(hWnd,GWW_HINSTANCE)
                    106: #define GETCLASSBRUSH(hWnd) (HBRUSH)GetClassWord(hWnd,GCW_HBRBACKGROUND)
                    107: #endif

unix.superglobalmegacorp.com

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