From 641789a1c653f46bacfb9dad0a2fde50ac360a5f Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Wed, 26 Dec 2018 22:38:08 +0100 Subject: focus and default button stuff --- alf/alf.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'alf/alf.h') diff --git a/alf/alf.h b/alf/alf.h index d50bd67..b224538 100644 --- a/alf/alf.h +++ b/alf/alf.h @@ -41,6 +41,7 @@ typedef struct { #define ALF_WM_SETMODALRESULT (ALF_WM__BASE + 7) #define ALF_WM_GETMODALRESULT (ALF_WM__BASE + 8) #define ALF_WM_CENTIPOINTTOPX (ALF_WM__BASE + 9) +#define ALF_WM_SETFOCUS (ALF_WM__BASE + 10) typedef struct { @@ -82,16 +83,19 @@ LRESULT ALF_DefWindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); HWND -ALF_AddLabel(HWND win, int id, UINT x, UINT y, const WCHAR *text); +ALF_AddLabel(HWND win, WORD id, UINT x, UINT y, const WCHAR *text); HWND -ALF_AddEdit(HWND win, int id, UINT x, UINT y, const WCHAR *text); +ALF_AddEdit(HWND win, WORD id, UINT x, UINT y, const WCHAR *text); HWND -ALF_AddButton(HWND win, int id, UINT x, UINT y, const WCHAR *text); +ALF_AddButton(HWND win, WORD id, UINT x, UINT y, const WCHAR *text); void -ALF_DestroyWidget(HWND win, int id); +ALF_SetDefaultButton(HWND win, WORD id); + +void +ALF_DestroyWidget(HWND win, WORD id); void ALF_AddWidget(HWND win, UINT x, UINT y, HWND widget, UINT cptWidth, UINT cptHeight, DWORD flags); @@ -100,7 +104,7 @@ void ALF_AddWidgetEx(HWND win, const ALFAddWidgetParams *params); HWND -ALF_WidgetHwndById(HWND win, int id); +ALF_WidgetHwndById(HWND win, WORD id); void ALF_RecalculateLayout(HWND win); -- cgit v1.2.3