From 960f0cef228a64ea598c4531d0a7d159dfb7ed0d Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Fri, 26 Jun 2020 14:28:27 +0200 Subject: spin box: initial implementation --- alf/alf.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'alf/alf.h') diff --git a/alf/alf.h b/alf/alf.h index 8969ee1..f6ef21d 100644 --- a/alf/alf.h +++ b/alf/alf.h @@ -125,6 +125,13 @@ typedef struct { #define ALF_WM_ICONVIEW_GETICON (ALF_WM__BASE + 201) #define ALF_WM_ICONVIEW_SETICON (ALF_WM__BASE + 202) +#define ALF_WM_SPINBOX_GETRANGE (ALF_WM__BASE + 201) +#define ALF_WM_SPINBOX_SETRANGE (ALF_WM__BASE + 202) +#define ALF_WM_SPINBOX_GETPOS (ALF_WM__BASE + 203) +#define ALF_WM_SPINBOX_SETPOS (ALF_WM__BASE + 204) +#define ALF_WM_SPINBOX_GETEDIT (ALF_WM__BASE + 205) +#define ALF_WM_SPINBOX_GETUDCTL (ALF_WM__BASE + 206) + #define ALF_WM_USER (ALF_WM__BASE + 300) typedef DWORD ALFColor; @@ -656,6 +663,27 @@ ALF_MessageDlg_Confirm(HWND owner, const TCHAR *text, const TCHAR *caption, cons WORD ALF_MessageDlg_ConfirmDanger(HWND owner, const TCHAR *text, const TCHAR *caption, const TCHAR *okBtnText, const TCHAR *cancelBtnText); +// spin box +HWND +ALF_AddNumericSpinBox(HWND parent, WORD id, int x, int y, short val, short min, short max); + +BOOL +ALF_SpinBox_Range(HWND spinbox, short *pmin, short *pmax); + +BOOL +ALF_SpinBox_SetRange(HWND spinbox, short min, short max); + +short +ALF_SpinBox_Pos(HWND spinbox); + +BOOL +ALF_SpinBox_SetPos(HWND spinbox, short pos); + +HWND +ALF_SpinBox_EditControl(HWND spinbox); + +HWND +ALF_SpinBox_UpDownControl(HWND spinbox); #ifdef __cplusplus } // extern C -- cgit v1.2.3