home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / msysjour / vol05 / 05 / forms / viewer.h < prev    next >
Text File  |  1990-09-01  |  2KB  |  54 lines

  1. /*
  2.  * FORM VIEWER - HEADER FILE
  3.  *
  4.  * 07/12/90 1.00 - Kevin P. Welch - initial creation.
  5.  *
  6.  */
  7.  
  8. /* default window characteristics */
  9. #define    VIEWER_STYLE      WS_OVERLAPPEDWINDOW
  10. #define    VIEWER_XPOS       CW_USEDEFAULT
  11. #define    VIEWER_YPOS       CW_USEDEFAULT
  12. #define    VIEWER_WIDTH      ((2*GetSystemMetrics(SM_CXSCREEN))/3)
  13. #define    VIEWER_HEIGHT     ((2*GetSystemMetrics(SM_CYSCREEN))/3)
  14.  
  15. #define    VIEWER_HWNDEDIT MAKEINTRESOURCE(100)
  16. #define    VIEWER_HFORMLIB MAKEINTRESOURCE(101)
  17.  
  18. /* menu definitions */
  19. #define    IDM_OPEN      0x0100
  20. #define    IDM_EDIT      0x0101
  21. #define    IDM_PRINT     0x0102
  22. #define    IDM_EXIT      0x0103
  23. #define    IDM_ABOUT     0x0104
  24.  
  25. /* dialog box definitions */
  26. #define    ID_OK         IDOK
  27. #define    ID_CANCEL     IDCANCEL
  28. #define    ID_FORM       0x0100
  29.  
  30. /* form interface definitions */
  31. #define    FORM_INIT     MAKEINTRESOURCE(2)
  32. #define    FORM_EDIT     MAKEINTRESOURCE(3)
  33. #define    FORM_PRINT    MAKEINTRESOURCE(4)
  34.  
  35. /* general programming definitions */
  36. #define    ID(x)         GetWindowWord(x,GWW_ID)
  37. #define    PARENT(x)     GetWindowWord(x,GWW_HWNDPARENT)
  38. #define    INSTANCE(x)   GetWindowWord(x,GWW_HINSTANCE)
  39. #define    WARNING(x,y)  MessageBox(x,y,"Form Viewer",
  40.                                     MB_OK|MB_ICONASTERISK)
  41.  
  42. /* utility function definitions */
  43. BOOL FAR PASCAL    Dialog( HWND, LPSTR, FARPROC );
  44. BOOL FAR PASCAL    CenterPopup( HWND, HWND );
  45.  
  46. /* window function definitions *application specific definitions */
  47. BOOL FAR PASCAL    OpenDlgFn( HWND, WORD, WORD, LONG );
  48. BOOL FAR PASCAL    AboutDlgFn( HWND, WORD, WORD, LONG );
  49. LONG FAR PASCAL    ViewerWndFn( HWND, WORD, WORD, LONG );
  50.  
  51. /* form library function definitions */
  52. typedef HANDLE (FAR PASCAL * LPEDITFN)( HWND, HANDLE );
  53. typedef HANDLE (FAR PASCAL * LPPRINTFN)( HWND, HANDLE );
  54.