-
Notifications
You must be signed in to change notification settings - Fork 0
/
hexedit.h
39 lines (29 loc) · 1.07 KB
/
hexedit.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#define HEX_EDIT_CLASS_NAME L"HexEdit32"
ATOM WINAPI
RegisterHexEditorClass(HINSTANCE hInstance);
BOOL WINAPI
UnregisterHexEditorClass(HINSTANCE hInstance);
/* styles */
#define HES_READONLY (0x800)
#define HES_LOWERCASE (0x10)
#define HES_UPPERCASE (0x8)
#define HES_AUTOVSCROLL (0x40)
#define HES_HIDEADDRESS (0x4)
/* messages */
#define HEM_BASE (WM_USER + 50)
#define HEM_LOADBUFFER (HEM_BASE + 1)
#define HEM_COPYBUFFER (HEM_BASE + 2)
#define HEM_SETMAXBUFFERSIZE (HEM_BASE + 3)
/* macros */
#define HexEdit_LoadBuffer(hWnd, Buffer, Size) \
SendMessageW((hWnd), HEM_LOADBUFFER, (WPARAM)(Buffer), (LPARAM)(Size))
#define HexEdit_ClearBuffer(hWnd) \
SendMessageW((hWnd), HEM_LOADBUFFER, 0, 0)
#define HexEdit_CopyBuffer(hWnd, Buffer, nMax) \
SendMessageW((hWnd), HEM_COPYBUFFER, (WPARAM)(Buffer), (LPARAM)(nMax))
#define HexEdit_GetBufferSize(hWnd) \
SendMessageW((hWnd), HEM_COPYBUFFER, 0, 0)
#define HexEdit_SetMaxBufferSize(hWnd, Size) \
SendMessageW((hWnd), HEM_SETMAXBUFFERSIZE, 0, (LPARAM)(Size))
/* EOF */