-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathutils.h
35 lines (32 loc) · 1.1 KB
/
utils.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
#pragma once
LPCWSTR get_message_name(DWORD msg);
void GetAllWindowsFromProcessID(DWORD dwProcessID, std::vector<HWND>& vhWnds);
void GetAllChildWindowsFromParent(HWND parent, std::vector<HWND>& vhWnds);
bool isClass(HWND hwnd, const TCHAR* classname);
bool classStartsWith(HWND hwnd, const TCHAR* classname);
bool isParentTitleStartingWith(HWND hwnd, const TCHAR* prefix);
void dbgMsg(HWND hWnd, UINT_PTR subclass, UINT message, WPARAM wParam, LPARAM lParam);
void SendInputF11();
typedef struct {
COLORREF menubar_textcolor;
COLORREF menubar_textcolor_disabled;
COLORREF menubar_bgcolor;
COLORREF menubaritem_bgcolor;
COLORREF menubaritem_bgcolor_hot;
COLORREF menubaritem_bgcolor_selected;
HBRUSH menubar_bgbrush;
HBRUSH menubaritem_bgbrush;
HBRUSH menubaritem_bgbrush_hot;
HBRUSH menubaritem_bgbrush_selected;
} _cfg_type;
const _cfg_type* load_config();
#define ASSERT_LAST_ERR(x) \
{ \
BOOL rc = x; \
if (!rc) { \
std::wstringstream ss; \
ss << L"GetLastError() = " << GetLastError() << std::endl; \
OutputDebugString(ss.str().c_str()); \
} \
assert(rc); \
}