diff options
| author | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-05-29 23:43:00 +0200 |
|---|---|---|
| committer | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-05-29 23:43:00 +0200 |
| commit | c9ebff8e7de093e7705aab6208593fae048ad98d (patch) | |
| tree | 06f641c182e4013e95c7fa1f255e4adbd32a67f2 /alf/alfpriv.h | |
| parent | 46326d57e0c912f265595ffed375d211bbe23f44 (diff) | |
controls: subclass generic "ALFControl" window
The idea is that the compiler can strip unused controls when linking
statically, but the window class initialization functions blocked that.
Diffstat (limited to 'alf/alfpriv.h')
| -rw-r--r-- | alf/alfpriv.h | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/alf/alfpriv.h b/alf/alfpriv.h index dd36f55..eb3c358 100644 --- a/alf/alfpriv.h +++ b/alf/alfpriv.h @@ -17,34 +17,14 @@ #include "alfcompat.h" #include "alflayout.h" -extern TCHAR *_alf_comboClass; -extern TCHAR *_alf_panelClass; -extern TCHAR *_alf_labelClass; -extern TCHAR *_alf_notebookClass; -extern TCHAR *_alf_buttonClass; -extern TCHAR *_alf_groupboxClass; extern TCHAR _alf_windowClass[]; +extern TCHAR _alf_controlClass[]; void -ALF_RegisterComboClass(void); - -void -ALF_RegisterPanelClass(void); - -void -ALF_RegisterLabelClass(void); - -void -ALF_RegisterNotebookClass(void); - -void -ALF_RegisterButtonClass(void); - -void -ALF_RegisterGroupBoxClass(void); +ALF_RegisterWindowClass(void); void -ALF_RegisterWindowClass(void); +ALF_RegisterControlClass(void); HWND ALF_CreatePanelWindow(HWND parent, WORD id); @@ -55,5 +35,19 @@ ALF_BuildUniqueName(TCHAR *buf, const TCHAR *prefix, ULONG_PTR uniquifier); void ALF_BuildUniqueNameW(WCHAR *buf, const WCHAR *prefix, ULONG_PTR uniquifier); +// TODO: think about making it public BOOL ALF_ShouldMessageBubble(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); + +// TODO: refine custom control API, make it public + +// passed as ptr in WM_CREATE +typedef struct { + WNDPROC windowProc; + void *param; +} ALFControlCreateParams; + +HWND +ALF_CreateControlWindow(DWORD exstyle, const TCHAR *text, DWORD style, + int x, int y, int w, int h, HWND parent, HMENU hmenu, + WNDPROC windowProc, void *param); |
