forked from stephaniewm55/WinVi-Minimalist-Text-Hex-Editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TabCtrl.h
64 lines (54 loc) · 1.85 KB
/
TabCtrl.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/********************************************************\
|* *|
|* Program: WinVi *|
|* Author: Raphael Molle *|
|* Compiler: several *|
|* --------------------- -------------------------- *|
|* © Copyright 1994-2009 by Raphael Molle, Berlin *|
|* © Copyleft by GPL See file COPYING for more *|
|* info about terms of use *|
|* *|
\********************************************************/
/* revision log:
* 3-Dec-2000 first publication of source code
* 1-Jan-2009 can now be compiled with VC++ 2008 Express
*/
#if !defined(WIN32) && !defined(_WIN32)
# define OWN_TABCTRL 1
#endif
#if !defined(RC_INVOKED) && defined(OWN_TABCTRL)
#if defined(WIN32)
# include <commctrl.h>
#endif
#if defined(TabCtrl_InsertItem)
# undef TabCtrl_InsertItem
# undef TabCtrl_SetCurSel
#endif
#define TabCtrl_InsertItem(hwnd,iItem,pitem) TabInsertItem(hwnd, iItem, pitem)
#define TabCtrl_SetCurSel(hwnd,iItem) TabSetCurSel(hwnd, iItem)
#if !defined(WIN32)
# define WM_NOTIFY 0x004E
# define TCM_GETCURSEL 0x1311
# define TCN_SELCHANGE 0xfdd9
# define TCIF_TEXT 0x0001
typedef struct tagNMHDR {
HWND hwndFrom;
UINT idFrom;
UINT code;
} NMHDR, FAR *LPNMHDR;
typedef struct tagTC_ITEM {
UINT mask;
DWORD dwState;
DWORD dwStateMask;
LPSTR pszText;
int cchTextMax;
int iImage;
LPARAM lParam;
} TC_ITEM;
#endif
BOOL TabInsertItem(HWND, INT, TC_ITEM*);
BOOL TabSetCurSel (HWND, INT);
BOOL TabCtrlPaint (HWND, HDC, PAINTSTRUCT*);
LRESULT CALLBACK TabCtrlProc (HWND, UINT, WPARAM, LPARAM);
BOOL TabCtrlInit (HWND, HFONT);
#endif