home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / os2sdk / os2sdk12 / ted / ted.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-06  |  4.4 KB  |  156 lines

  1. /***************************************************************************
  2.  
  3.    TED.H
  4.  
  5.    Created by Microsoft Corporation, IBM Corporation 1989
  6.  
  7. ****************************************************************************/
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17. #define ID_RESOURCE    0x100     /* Resource identifier */
  18.  
  19. /* Submenu IDs */
  20.  
  21. #define IDM_FILE 0x100
  22. #define IDM_EDIT 0x200
  23. #define IDM_OPT  0x300
  24. #define IDM_HELP 0x400
  25.  
  26. /* Message IDs */
  27.  
  28. #define IDM_NEWFILE     0x101
  29. #define IDM_OPENFILE    0x105
  30. #define IDM_SAVE        0x110
  31. #define IDM_SAVEAS    0x115
  32.  
  33. #define IDM_UNDO        0x201
  34. #define IDM_CUT     0x205
  35. #define IDM_COPY    0x210
  36. #define IDM_PASTE    0x215
  37. #define IDM_FIND        0x220
  38. #define IDM_SELECT_ALL  0x225
  39.  
  40.  
  41. #define IDM_SETWRAP    0x301
  42. #define IDM_QUERYLINES    0x305
  43.  
  44.  
  45. #define IDM_DISPLAY_HELP 0x401
  46. #define IDM_EXT_HELP     0x405
  47. #define IDM_KEYS_HELP     0x410
  48. #define IDM_INDEX_HELP     0x415
  49. #define IDM_ABOUT        0x420
  50.  
  51.  
  52.  
  53.  
  54.  
  55. /***************************************
  56.    Function prototypes
  57.  ***************************************/
  58.  
  59. MRESULT EXPENTRY ClientWndProc    (HWND, USHORT, MPARAM, MPARAM) ;
  60. MRESULT EXPENTRY FrameWndProc    (HWND, USHORT, MPARAM, MPARAM) ;
  61. MRESULT EXPENTRY FindDlgProc    (HWND, USHORT, MPARAM, MPARAM) ;
  62. MRESULT EXPENTRY AboutDlgProc   (HWND, USHORT, MPARAM, MPARAM) ;
  63.  
  64. VOID MLESaveFile( HWND, PSZ, PSZ );
  65. VOID MLEOpenFile( HWND, PSZ, PSZ );
  66. VOID MLEInit( HWND );
  67. VOID MLESetWrap( HWND, HWND, BOOL );
  68. VOID  MLEEnable ( HWND );
  69. VOID  MLEDisable( HWND );
  70. BOOL  MLEDeleteContents( HWND );
  71. BOOL  MLESaveToFile ( HFILE );
  72. VOID  TEDInitDlgSysMenu( HWND );
  73. BOOL  TEDDisplayErrorID( USHORT );
  74. VOID  TEDInitFileName ( VOID );
  75. VOID  TEDCleanupExit  ( VOID );
  76. VOID  TEDUpdateTitleBar( HWND, PSZ, PSZ );
  77.  
  78.  
  79. /*  Some macros */
  80.  
  81.  
  82. /**************************************************************************
  83.     Note: "TED Notification" should be loaded from a resource string, but
  84.           since this is only a sample it was left this way for clarity.
  85. **************************************************************************/
  86.  
  87. #define MESSAGE(x) WinMessageBox(HWND_DESKTOP, \
  88.              WinQueryActiveWindow( HWND_DESKTOP, FALSE), \
  89.              x, \
  90.                          "TED Notification", \
  91.                          0, \
  92.              MB_OK | MB_ICONEXCLAMATION | MB_APPLMODAL | MB_MOVEABLE)
  93.  
  94.  
  95.  
  96.  
  97. /**********************
  98.       Buffer Allocation
  99. ***********************/
  100.  
  101.  
  102. /*************************************************************************
  103.     Define the maximum size of the MLE, and the buffer to allocate when
  104.     we EXPORT/IMPORT data to it.
  105. *************************************************************************/
  106.  
  107.  
  108. #define TXT_LIMIT 30000   /* NOTE: this should never exceed 64000 without */
  109.                           /* rewriting key parts of the application       */
  110.                           /* DosRead / DosWrite etc. !!!!!!!!!!!!!!!!!!!! */
  111.  
  112.  
  113. #define MAX_STRING_SIZE  256 /* Max size of strings */
  114.  
  115. /*
  116. ** String ID's
  117. */
  118.  
  119. #define SID_HERR_NO_INIT                 0x200
  120. #define SID_UNABLE_TO_CREATE_FRAME       0x201
  121. #define SID_UNABLE_TO_SUB_FRAME          0x202
  122. #define SID_UNABLE_TO_SUB_CLIENT         0x203
  123. #define SID_UNABLE_TO_SET_FRAME_OWNER    0x204
  124. #define SID_MLEMSG_TEXTOVERFLOW          0x205
  125. #define SID_MLEMSG_MLN_OVERFLOW          0x206
  126. #define SID_DLG_CANT_LOAD_FIND           0x207
  127. #define SID_DLG_CANT_LOAD_ABOUT          0x208
  128. #define SID_DLG_FIND_CANT_DISMISS        0x209
  129. #define SID_TED_UNTITLED                 0x210
  130. #define SID_UNABLE_TO_EXPORT             0x211
  131. #define SID_CANT_ALLOCATE_MEMORY         0x212
  132.  
  133.  
  134.  
  135. #define SID_UNABLE_TO_SET_NEWSIZE        0x213
  136. #define SID_DOSWRITE_FAILED              0x214
  137. #define SID_WRONG_BYTE_COUNT             0x215
  138. #define SID_DOSQFILEINFO_FAILED          0x216
  139. #define SID_FILE_TOO_LARGE               0x217
  140. #define SID_DOS_READ_FAILED              0x219
  141. #define SID_CANT_SET_WRAP                0x220
  142. #define SID_CANT_OPEN_EX_FILE            0x221
  143. #define SID_CANT_FIND                    0x222
  144.  
  145. #define SID_HELP_CANT_CREATE_INST        0x500
  146. #define SID_HELP_CANT_ASSOC_INST         0x501
  147. #define SID_HELP_HLP_ERROR               0x502
  148.  
  149.  
  150.  
  151. #define SID_HERR_NO_LIBRARY              0x600
  152. #define SID_HERR_TITLE                   0x601
  153. #define SID_HERR_UNKNOWN                 0x602
  154. #define SID_HERR_MEMORY                  0x603
  155. #define SID_HERR_LIB_ERROR               0x604
  156.