home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / exedt040.zip / src / exedit.h < prev    next >
C/C++ Source or Header  |  1997-05-08  |  3KB  |  117 lines

  1. #include "res.h"
  2. #include "settings.h"
  3. #include "toolbar.h"
  4. #include "status.h"
  5.  
  6.  
  7. // New Classes
  8. #define WC_MAIN  "MainWindow"
  9. #define WC_CHILD "ChildWindow"
  10.  
  11. //Identifiers
  12. #define Id_MainWindow  1
  13. #define Id_ChildWindow 2
  14. #define Id_MLEWindow   3
  15. #define Id_Toolbar     4
  16. #define Id_WinList     5
  17. #define Id_Statusbar   6
  18.  
  19. //Ini
  20. #define APP_NAME "exedit"
  21. #define SAVE_WINPOS "winsize"
  22.  
  23. //WinList
  24. #define WinList_First    1500
  25. #define WinList_MaxItems 15
  26.  
  27. //Window Procedures
  28. MRESULT EXPENTRY MainWindow_Proc (HWND thisHWnd,ULONG msg,MPARAM mp1,MPARAM mp2);
  29. MRESULT EXPENTRY FrameWindow_Proc(HWND hwnd,ULONG msg, MPARAM mp1,MPARAM mp2);
  30. MRESULT EXPENTRY ChildWindow_Proc(HWND hwnd,ULONG msg, MPARAM mp1,MPARAM mp2);
  31.  
  32. MRESULT EXPENTRY Dlg_Settings_Proc(HWND hwnd,ULONG msg, MPARAM mp1,MPARAM mp2);
  33. MRESULT EXPENTRY D_Search_Proc(HWND hwnd,ULONG msg, MPARAM mp1,MPARAM mp2);
  34.  
  35. // Search Dlg Struct and Messages
  36.  
  37. #define SM_FIND        WM_USER+1
  38. #define SM_REPLACE     WM_USER+2
  39. #define SM_REFRESHDATA WM_USER+3
  40.  
  41. typedef struct _TSearchDlg
  42. {
  43.  USHORT usSzStruct;
  44.  char FText[50];
  45.  BOOL CaseSens,Select;
  46.  BOOL WholeWord;
  47.  HWND hwnd;
  48.  IPT Start,End;
  49.  IPT SStart,SEnd;
  50.  char Rtext[50];
  51.  } TSearchDlg;
  52.  
  53. // Mle subclass data struct
  54.  
  55. typedef
  56. struct _TMle
  57. {
  58.  USHORT usSzStruct;
  59.  PFNWP OldProc;
  60.  HWND hwndMenu,hwndMenuOwner;
  61.  HWND hwndStatusbar;
  62.  char StText[255];
  63. } TMle;
  64.  
  65. // Main Frame subclass data struct
  66.  
  67. typedef
  68. struct _TFMain
  69. {
  70.  USHORT usSzStruct;
  71.  PFNWP OldProc;
  72.  HWND hwndToolbar,hwndStatusbar;
  73. }TFMain;
  74.  
  75.  
  76. //Main Data Struct
  77. typedef
  78. struct _TMain
  79. {
  80.  USHORT usSzStruct;
  81.  char Untitled[10];
  82.  FILEDLG FileDlg;
  83.  TSettings DefSettings;
  84.  HWND hwndMleMenu,hwndStatusbar;
  85. } TMain;
  86.  
  87. //Child Data Struct
  88. typedef
  89. struct _TChild
  90. {
  91.  USHORT usSzStruct;
  92.  HWND hwndMLE;
  93.  TMle *Mle;
  94.  TMain *Main;
  95.  char FileName[255];
  96.  HWND hwndStatusbar;
  97.  TSearchDlg SearchDlg;
  98. } TChild;
  99.  
  100. //Misc Procedures
  101. void RegisterChild(HAB hab);
  102. HWND CreateChild(HWND hwnd,PSZ Title);
  103. void FileOpen(TChild *Child);
  104. MPARAM ChildSendMsg(HWND hwndMain,ULONG msg,MPARAM mp1,MPARAM mp2);
  105. void FileSave (TChild *Child);
  106. int ChildCount(HWND hwndMain);
  107. void AllChildSendMsg(HWND hwndMain,ULONG msg,MPARAM mp1,MPARAM mp2);
  108. void CItemsEnable(HWND hwnd,BOOL State);
  109. void RefreshWinList (HWND hwndClient);
  110. void UpdateSettings(HWND hwnd,TSettings *Set,BOOL all);
  111. void MaxChilds(HWND hwndMain);
  112. LONG Search(char *in,char *str,char cs,char w);
  113.  
  114. //Misc new messages
  115.  
  116. #define WM_CLOSEALL WM_USER+4
  117.