home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2006 April / DPPRO0406DVD.ISO / Essentials / Programming / Notepad2 / Source / NP2SRC.ZIP / Notepad2.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-06-25  |  3.4 KB  |  112 lines

  1. /******************************************************************************
  2. *
  3. *
  4. * Notepad2
  5. *
  6. * Notepad2.h
  7. *   Global definitions and declarations
  8. *
  9. * See Readme.txt for more information about this source code.
  10. * Please send me your comments to this work.
  11. *
  12. * Distributed under the terms of the GNU General Public License,
  13. * see License.txt for details.
  14. *
  15. *                                              (c) Florian Balmer 1996-2004
  16. *                                                       textview@bluewin.ch
  17. *                                               http://www.flos-freeware.ch
  18. *
  19. *
  20. ******************************************************************************/
  21.  
  22.  
  23.  
  24. //==== Main Window ============================================================
  25. #define WC_NOTEPAD2 "Notepad2"
  26. #define WC_NOTEPAD2PASTEBOARD "Notepad2PasteBoard"
  27.  
  28.  
  29. //==== Data Type for WM_COPYDATA ==============================================
  30. #define DATA_NOTEPAD2_FILEARG 0xDE70
  31.  
  32.  
  33. //==== Toolbar Style ==========================================================
  34. #define WS_TOOLBAR (WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | \
  35.                     TBSTYLE_TOOLTIPS | TBSTYLE_FLAT | TBSTYLE_ALTDRAG | \
  36.                     TBSTYLE_LIST | CCS_NODIVIDER | CCS_NOPARENTALIGN | \
  37.                     CCS_ADJUSTABLE)
  38.  
  39.  
  40. //==== ReBar Style ============================================================
  41. #define WS_REBAR (WS_CHILD | WS_CLIPCHILDREN | WS_BORDER | RBS_VARHEIGHT | \
  42.                   RBS_BANDBORDERS | CCS_NODIVIDER | CCS_NOPARENTALIGN)
  43.  
  44.  
  45. //==== Ids ====================================================================
  46. #define IDC_STATUSBAR    0xFB00
  47. #define IDC_TOOLBAR      0xFB01
  48. #define IDC_REBAR        0xFB02
  49. #define IDC_EDIT         0xFB03
  50. #define IDC_EDITFRAME    0xFB04
  51.  
  52.  
  53. //==== Statusbar ==============================================================
  54. #define STATUS_DOCPOS    0
  55. #define STATUS_DOCSIZE   1
  56. #define STATUS_CODEPAGE  2
  57. #define STATUS_EOLMODE   3
  58. #define STATUS_OVRMODE   4
  59. #define STATUS_LEXER     5
  60. #define STATUS_HELP    255
  61.  
  62.  
  63. //==== Change Notifications ===================================================
  64. //#define ID_WATCHTIMER 0xA000
  65. //#define WM_CHANGENOTIFY WM_USER+1
  66. //#define WM_CHANGENOTIFYCLEAR WM_USER+2
  67.  
  68.  
  69. //==== Callback Message from System Tray ======================================
  70. #define WM_TRAYMESSAGE WM_USER
  71.  
  72.  
  73. //==== Function Declarations ==================================================
  74. BOOL InitApplication(HINSTANCE);
  75. HWND InitInstance(HINSTANCE,LPSTR,int);
  76. BOOL ActivatePrevInst();
  77. void ShowNotifyIcon(HWND,BOOL);
  78. void SetNotifyIconTitle(HWND);
  79. //void InstallFileWatching(LPCSTR);
  80. //void CALLBACK WatchTimerProc(HWND,UINT,UINT_PTR,DWORD);
  81.  
  82.  
  83. void LoadSettings();
  84. void SaveSettings(BOOL);
  85. void ParseCommandLine(LPSTR);
  86.  
  87.  
  88. void UpdateStatusbar();
  89. void UpdateToolbar();
  90. void UpdateLineNumberWidth();
  91.  
  92.  
  93. BOOL FileIO(BOOL,LPCSTR,BOOL,int*,int*,BOOL*,BOOL*,BOOL);
  94. BOOL FileLoad(BOOL,BOOL,BOOL,BOOL,LPCSTR);
  95. BOOL FileSave(BOOL,BOOL,BOOL,BOOL);
  96. BOOL OpenFileDlg(HWND,LPSTR,int,LPCSTR);
  97. BOOL SaveFileDlg(HWND,LPSTR,int);
  98.  
  99.  
  100. LRESULT CALLBACK MainWndProc(HWND,UINT,WPARAM,LPARAM);
  101. LRESULT MsgCreate(HWND,WPARAM,LPARAM);
  102. void    CreateBars(HWND,HINSTANCE,LPTBSAVEPARAMS);
  103. void    MsgThemeChanged(HWND,WPARAM,LPARAM);
  104. void    MsgSize(HWND,WPARAM,LPARAM);
  105. void    MsgInitMenu(HWND,WPARAM,LPARAM);
  106. LRESULT MsgCommand(HWND,WPARAM,LPARAM);
  107. LRESULT MsgNotify(HWND,WPARAM,LPARAM);
  108.  
  109.  
  110.  
  111. ///   End of Textview.h   \\\
  112.