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