diff options
Diffstat (limited to 'alf/alf.h')
| -rw-r--r-- | alf/alf.h | 40 |
1 files changed, 38 insertions, 2 deletions
@@ -45,6 +45,9 @@ typedef struct { #define ALF_WM_SETFOCUS (ALF_WM__BASE + 10) #define ALF_WM_GETAPPLICATION (ALF_WM__BASE + 11) #define ALF_WM_APPLYSIZE (ALF_WM__BASE + 12) +#define ALF_WM_GETLAYOUTPARAMS (ALF_WM__BASE + 13) +#define ALF_WM_SETLAYOUTPARAMS (ALF_WM__BASE + 14) +#define ALF_WM_GETWIDGETATPOS (ALF_WM__BASE + 15) typedef struct { const TCHAR *className; @@ -60,7 +63,7 @@ typedef struct { UINT height; DWORD flags; UINT margins[4]; -} ALFAddWidgetParams; +} ALFWidgetLayoutParams; typedef struct ALFAppPriv *ALFAPP; @@ -119,7 +122,7 @@ void ALF_AddWidget(HWND win, UINT x, UINT y, HWND widget, UINT cptWidth, UINT cptHeight, DWORD flags); void -ALF_AddWidgetEx(HWND win, const ALFAddWidgetParams *params); +ALF_AddWidgetEx(HWND win, const ALFWidgetLayoutParams *params); HWND ALF_WidgetHwndById(HWND win, WORD id); @@ -157,6 +160,39 @@ ALF_Text(HWND hwnd); TCHAR * // free with HeapFree ALF_WidgetText(HWND parent, WORD id); +DWORD +ALF_WidgetLayoutFlags(HWND parent, HWND widget); + +BOOL +ALF_SetWidgetLayoutFlags(HWND parent, HWND widget, DWORD flags); + +static inline void +ALF_AddWidgetLayoutFlag(HWND parent, HWND widget, DWORD flag) +{ + ALF_SetWidgetLayoutFlags(parent, widget, ALF_WidgetLayoutFlags(parent, widget) | flag); +} + +static inline void +ALF_RemoveWidgetLayoutFlag(HWND parent, HWND widget, DWORD flag) +{ + ALF_SetWidgetLayoutFlags(parent, widget, ALF_WidgetLayoutFlags(parent, widget) & ~flag); +} + +BOOL +ALF_WidgetLayoutPosition(HWND parent, HWND widget, UINT *pX, UINT *pY); + +BOOL +ALF_SetWidgetLayoutPosition(HWND parent, HWND widget, UINT x, UINT y); + +BOOL +ALF_WidgetLayoutSize(HWND parent, HWND widget, UINT *pCptWidth, UINT *pCptHeight); + +BOOL +ALF_SetWidgetLayoutSize(HWND parent, HWND widget, UINT cptWidth, UINT cptHeight); + +HWND +ALF_WidgetAtLayoutPosition(HWND parent, UINT x, UINT y); + // combo box HWND |
