home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / MSJV5-6.ZIP / FORM2.ZIP / VIEWER.H < prev    next >
Text File  |  1990-11-01  |  3KB  |  73 lines

  1. /*
  2.  * FORM VIEWER - HEADER FILE
  3.  *
  4.  * LANGUAGE      : Microsoft C 5.1
  5.  * ENVIRONMENT   : Microsoft Windows 3.00 SDK
  6.  * STATUS        : operational
  7.  *
  8.  *    Eikon Systems, Inc.
  9.  *    989 East Hillsdale Blvd, Suite 260
  10.  *    Foster City, California 94404
  11.  *
  12.  * 07/12/90 1.00 - Kevin P. Welch - initial creation.
  13.  *
  14.  */
  15.  
  16. /* default window characteristics */
  17. #define     VIEWER_STYLE      WS_OVERLAPPEDWINDOW
  18. #define     VIEWER_XPOS       CW_USEDEFAULT
  19. #define     VIEWER_YPOS       CW_USEDEFAULT
  20. #define     VIEWER_WIDTH      ((2*GetSystemMetrics(SM_CXSCREEN))/3)
  21. #define     VIEWER_HEIGHT     ((2*GetSystemMetrics(SM_CYSCREEN))/3)
  22.  
  23. /* window property definitions */
  24. #define     VIEWER_HWNDEDIT   MAKEINTRESOURCE(100)
  25. #define     VIEWER_HFORMLIB   MAKEINTRESOURCE(101)
  26.  
  27. #define     GET_EDIT(x)       GetProp(x,VIEWER_HWNDEDIT)
  28. #define     GET_FORM(x)       GetProp(x,VIEWER_HFORMLIB)
  29.  
  30. #define     SET_EDIT(x,y)     SetProp(x,VIEWER_HWNDEDIT,y)
  31. #define     SET_FORM(x,y)     SetProp(x,VIEWER_HFORMLIB,y)
  32.  
  33. #define     REM_EDIT(x)       RemoveProp(x,VIEWER_HWNDEDIT)
  34. #define     REM_FORM(x)       RemoveProp(x,VIEWER_HFORMLIB)
  35.  
  36. /* menu definitions */
  37. #define     IDM_OPEN          0x0100
  38. #define     IDM_EDIT          0x0101
  39. #define     IDM_PRINT         0x0102
  40. #define     IDM_EXIT          0x0103
  41. #define     IDM_ABOUT         0x0104
  42.  
  43. /* dialog box definitions */
  44. #define     ID_OK             IDOK
  45. #define     ID_CANCEL         IDCANCEL
  46. #define     ID_FORM           0x0100
  47.  
  48. /* form interface definitions */
  49. #define     FORM_INIT         MAKEINTRESOURCE(2)
  50. #define     FORM_EDIT         MAKEINTRESOURCE(3)
  51. #define     FORM_PRINT        MAKEINTRESOURCE(4)
  52.  
  53. /* general programming definitions */
  54. #define     ID(x)             GetWindowWord(x,GWW_ID)
  55. #define     PARENT(x)         GetWindowWord(x,GWW_HWNDPARENT)
  56. #define     INSTANCE(x)       GetWindowWord(x,GWW_HINSTANCE)
  57. #define     WARNING(x,y)      MessageBox(x,y,"Form Viewer",MB_OK|MB_ICONASTERISK)
  58.  
  59. /* utility function definitions */
  60. HANDLE FAR PASCAL    GetText( HWND );
  61. HANDLE FAR PASCAL    SetText( HWND, HANDLE );
  62. BOOL FAR PASCAL      CenterPopup( HWND, HWND );
  63. BOOL FAR PASCAL      Dialog( HWND, LPSTR, FARPROC );
  64.  
  65. /* window function definitions *application specific definitions */
  66. BOOL FAR PASCAL      OpenDlgFn( HWND, WORD, WORD, LONG );
  67. BOOL FAR PASCAL      AboutDlgFn( HWND, WORD, WORD, LONG );
  68. LONG FAR PASCAL      ViewerWndFn( HWND, WORD, WORD, LONG );
  69.  
  70. /* form library function definitions */
  71. typedef HANDLE (FAR PASCAL * LPEDITFN)( HWND, HANDLE );
  72. typedef HANDLE (FAR PASCAL * LPPRINTFN)( HWND, HANDLE );
  73.