Grabby/GrbyCfg/Dialog.h

25 lines
600 B
C
Raw Normal View History

#pragma once
#define _DLG_MSG_SUFFIX "{990f4b34-579a-4fbc-a5b2-08f46ef5e9c5}"
#define USER_MSG_NAME(name) _T( #name _DLG_MSG_SUFFIX )
#define DEFINE_USER_MSG(name) {\
LPCTSTR name##_MSG = USER_MSG_NAME(name); \
name = RegisterWindowMessage(name##_MSG); \
}
#define DECLARE_USER_MSG(name) \
UINT name;
/* --- */
DECLARE_USER_MSG(WMU_SAVE_CONFIG)
DECLARE_USER_MSG(WMU_SETTING_CHANGED)
void InitUserMsgs(void);
#define ChangedSetting(hwnd) \
SendMessage(hwnd, \
WMU_SETTING_CHANGED, \
0, 0)
#define IsChecked(ref) \
(IsDlgButtonChecked(hDlg, ref) == BST_CHECKED)