home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pc3270sa.zip / pcsmain / pcsmain.h < prev    next >
Text File  |  2002-02-28  |  7KB  |  153 lines

  1. /*****************************************************************************/
  2. /*                                                                           */
  3. /*  File name   : PCSMAIN.H                                                  */
  4. /*                                                                           */
  5. /*  Description : Defines constants and function prototypes                  */
  6. /*                                                                           */
  7. /*  Concepts    : [none]                                                     */
  8. /*                                                                           */
  9. /*  API's       : [none]                                                     */
  10. /*                                                                           */
  11. /*  Required                                                                 */
  12. /*    Files     : [none]                                                     */
  13. /*                                                                           */
  14. /*  Copyright  (C)  1994, 1996  IBM  Corporation                             */
  15. /*                                                                           */
  16. /*                    All rights reserved.                                   */
  17. /*                                                                           */
  18. /*****************************************************************************/
  19. /*-----------------------------------------------------------------------------*
  20. |  Menu IDs                                                                    |
  21. *-----------------------------------------------------------------------------*/
  22. #define IDM_FILE                300
  23. #define IDM_FILE_ABOUT          301
  24. #define IDM_FILE_CLEAR          302
  25. #define IDM_FILE_TITLE          303
  26. #define IDM_FILE_EXIT           304
  27. #define IDM_FILE_TOP            305
  28.  
  29. #define IDM_PCSAPI              310
  30. #define IDM_PCSAPI_START        311
  31. #define IDM_PCSAPI_STOP         312
  32. #define IDM_PCSAPI_STATUS       313
  33. #define IDM_PCSAPI_PROFILE      314
  34. #define IDM_PCSAPI_CONN         315
  35. #define IDM_PCSAPI_DISCONN      316
  36. #define IDM_PCSAPI_TIMEOUT      317
  37.  
  38. /*-----------------------------------------------------------------------------*
  39. |  Icon IDs                                                                    |
  40. *-----------------------------------------------------------------------------*/
  41. #define ICONPCSMAIN             400
  42.  
  43. /*-----------------------------------------------------------------------------*
  44. |  Dialog IDs                                                                  |
  45. *-----------------------------------------------------------------------------*/
  46. #define START_DLG               500
  47. #define STOP_DLG                501
  48. #define STATUS_DLG              502
  49. #define PROF_DLG                503
  50. #define CONN_DLG                504
  51. #define DISCONN_DLG             505
  52. #define TIMEOUT_DLG             506
  53. #define ABOUTBOX                507
  54. #define TITLEBOX                508
  55.  
  56. #define DID_SESID_GP            600
  57. #define DID_SESID               601
  58. #define DID_PRONAME_GP          602
  59. #define DID_PRONAME             603
  60. #define DID_VIS_GP              604
  61. #define DID_RESTORE             605
  62. #define DID_HIDE                606
  63. #define DID_RES                 607
  64. #define DID_SHOW_MAX            608
  65. #define DID_MIN_NOACT           609
  66. #define DID_SHOW_NA             610
  67. #define DID_SHOW_NORM           611
  68. #define DID_MIN                 612
  69. #define DID_SHOW                613
  70. #define DID_SHOW_MIN            614
  71. #define DID_SHOW_NO_ACT         615
  72.  
  73. #define DID_PRO_SAVE_GP         616
  74. #define DID_SAVE_AS_PROFILE     617
  75. #define DID_SAVE_ON_EXIT        618
  76. #define DID_NOSAVE_ON_EXIT      619
  77.  
  78. #define DID_STARTED_ST          620
  79. #define DID_STARTED             621
  80. #define DID_ONLINE_ST           622
  81. #define DID_ONLINE              623
  82. #define DID_API_ENABLED_ST      624
  83. #define DID_API_ENABLED         625
  84.  
  85. #define DID_TIMEOUTVALUE_GP     626
  86. #define DID_TIMEOUTVALUE        627
  87.  
  88. #define IDD_TITLE               628
  89. #define IDD_LIST                629
  90.  
  91. #define ID_IGNORE               -1
  92. /*-----------------------------------------------------------------------------*
  93. |  String IDs                                                                  |
  94. *-----------------------------------------------------------------------------*/
  95. #define LS_MENU                 300
  96. #define LS_LIST                 301
  97. #define LS_LISTBOX              302
  98. #define LS_CLASS                303
  99. #define LS_TITLE                304
  100.  
  101. #define LS_NO_SESSIONID         305
  102. #define LS_NO_PROFILENAME       306
  103. #define LS_SESSION_NOTSTARTED   307
  104. #define LS_INVALID_SESSIONID    308
  105. #define LS_ACTIVE_SESSIONID     309
  106. #define LS_PROFILE_ERROR        310
  107. #define LS_SYSTEM_ERROR         311
  108. #define LS_SAMPLE_PROGRAM       312
  109. #define LS_SESSION_CANNOTSTOP   313
  110. #define LS_NO_TIMEOUTVALUE      314
  111. #define LS_INVALID_TIMEOUTVALUE 315
  112. #define LS_TIMEOUT_ERROR        316
  113. /*-----------------------------------------------------------------------------*
  114. |  Defines for the main window's size                                          |
  115. *-----------------------------------------------------------------------------*/
  116. #define MAIN_WIDTH              300
  117. #define MAIN_HEIGHT             180
  118.  
  119. /*-----------------------------------------------------------------------------*
  120. |  Miscellaneous defines                                                       |
  121. *-----------------------------------------------------------------------------*/
  122. #define FILENAME_LENGTH         80
  123. #define BUFFER_LENGTH           64
  124. #define STRING_LEN              10
  125. #define TITLE_LEN               64
  126. #define LISTBOX_MAXWIDTH        1000
  127.  
  128. /*-----------------------------------------------------------------------------*
  129. |  Function prototypes                                                         |
  130. *-----------------------------------------------------------------------------*/
  131. int    PASCAL WinMain(HANDLE, HANDLE, LPSTR, int);
  132. LRESULT CALLBACK MainWndProc(HWND, UINT, WPARAM, LPARAM);
  133. LRESULT CALLBACK ListWndProc(HWND, UINT, WPARAM, LPARAM);
  134. LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
  135. LRESULT CALLBACK TitleDlgProc(HWND, UINT, WPARAM, LPARAM);
  136.  
  137. LRESULT CALLBACK StartDlgProc(HWND, UINT, WPARAM, LPARAM);
  138. LRESULT CALLBACK StopDlgProc(HWND, UINT, WPARAM, LPARAM);
  139. LRESULT CALLBACK StatusDlgProc(HWND, UINT, WPARAM, LPARAM);
  140. LRESULT CALLBACK ProfileDlgProc(HWND, UINT, WPARAM, LPARAM);
  141. LRESULT CALLBACK ConnectDlgProc(HWND, UINT, WPARAM, LPARAM);
  142. LRESULT CALLBACK DisconnectDlgProc(HWND, UINT, WPARAM, LPARAM);
  143. LRESULT CALLBACK SetLinkTimeoutDlgProc(HWND, UINT, WPARAM, LPARAM);
  144.  
  145. /*-----------------------------------------------------------------------------*
  146. |  Global variables                                                            |
  147. *-----------------------------------------------------------------------------*/
  148. HANDLE   ghInst = NULL;
  149. HWND     ghListBox = NULL;
  150. HWND     ghMainWnd = NULL;
  151. BOOL     fTopmost = FALSE;
  152. CHAR     glpProfile[MAXPATHLEN] = {0x00};
  153.