Merge trunk HEAD (r46369)
[reactos.git] / reactos / base / applications / regedit / hexedit.h
1 #ifndef __HEXEDIT_H
2 #define __HEXEDIT_H
3
4 #define HEX_EDIT_CLASS_NAME _T("HexEdit32")
5
6 ATOM WINAPI
7 RegisterHexEditorClass(HINSTANCE hInstance);
8 BOOL WINAPI
9 UnregisterHexEditorClass(HINSTANCE hInstance);
10
11 /* styles */
12 #define HES_READONLY (0x800)
13 #define HES_LOWERCASE (0x10)
14 #define HES_UPPERCASE (0x8)
15 #define HES_AUTOVSCROLL (0x40)
16 #define HES_HIDEADDRESS (0x4)
17
18 /* messages */
19 #define HEM_BASE (WM_USER + 50)
20 #define HEM_LOADBUFFER (HEM_BASE + 1)
21 #define HEM_COPYBUFFER (HEM_BASE + 2)
22 #define HEM_SETMAXBUFFERSIZE (HEM_BASE + 3)
23
24 /* macros */
25 #define HexEdit_LoadBuffer(hWnd, Buffer, Size) \
26 SendMessage((hWnd), HEM_LOADBUFFER, (WPARAM)(Buffer), (LPARAM)(Size))
27
28 #define HexEdit_ClearBuffer(hWnd) \
29 SendMessage((hWnd), HEM_LOADBUFFER, 0, 0)
30
31 #define HexEdit_CopyBuffer(hWnd, Buffer, nMax) \
32 SendMessage((hWnd), HEM_COPYBUFFER, (WPARAM)(Buffer), (LPARAM)(nMax))
33
34 #define HexEdit_GetBufferSize(hWnd) \
35 SendMessage((hWnd), HEM_COPYBUFFER, 0, 0)
36
37 #define HexEdit_SetMaxBufferSize(hWnd, Size) \
38 SendMessage((hWnd), HEM_SETMAXBUFFERSIZE, 0, (LPARAM)(Size))
39
40 #endif /* __HEXEDIT_H */