-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodule.h
More file actions
67 lines (56 loc) · 1.72 KB
/
module.h
File metadata and controls
67 lines (56 loc) · 1.72 KB
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
65
66
67
// Module.h by Amash Shafi Jami
#pragma once
#include <Windows.h>
#include <windowsx.h>
#include <tchar.h>
#include <strsafe.h>
#include <ctype.h>
#define MAX_POPUP_ITEMS 32
#define COUNTMENUITEMS 7
#define CY_MENU_ITEM 18
#define MENU_ITEM_CHAR_SIZE 256
#define POPUP_MENU_ITEM_CHAR_SIZE MENU_ITEM_CHAR_SIZE
#define ERR_CHAR szErrBuff
#define ERR_CHAR_SIZE 256
#define ERR_CHAR_RESERVE static TCHAR ERR_CHAR[ERR_CHAR_SIZE];
#define ERR_CHAR_FILL_1_VALUE(format,y) StringCchPrintf( \
ERR_CHAR,\
ERR_CHAR_SIZE,\
_TEXT(format) \
,y \
);
typedef struct PopupMenuItemStructArray PopupMenuItemStructArray;
typedef void (*OnClickCallback)(LPCSTR title);
typedef struct ColorSchemeStruct{
COLORREF Active;
COLORREF Passive;
COLORREF Border;
int BorderWidth;
} ColorSchemeStruct;
typedef struct MenuItemStruct {
TCHAR szTitle[MENU_ITEM_CHAR_SIZE];
int cxOffset;
int cxTextPadding;
BOOL isHovered;
BOOL isRightMost;
ColorSchemeStruct ColScheme;
// INTERNALLY - HANDLED
BOOL isStrLong;
// INTERNALLY - HANDLED
HWND hHoverBox;
// INTERNALLY - HANDLED
HWND hPopUp;
// INTERNALLY - HANDLED
int WidthFactor;
// INTERNALLY - HANDLED
PopupMenuItemStructArray* pmisa;
} MenuItemStruct;
typedef struct PopupMenuItemStuct{
TCHAR szTitle[POPUP_MENU_ITEM_CHAR_SIZE];
ColorSchemeStruct ColScheme;
OnClickCallback OnClick;
} PopupMenuItemStruct;
typedef struct PopupMenuItemStructArray{
PopupMenuItemStruct* array[MAX_POPUP_ITEMS];
int count;
} PopupMenuItemStructArray;