![]() |
MKI_DialogHandleSpinInt64 (Dialogs) New in Version 2022.2 |
www.CAD6.com |
C++ Syntaxbool MKI_DialogHandleSpinInt64( HWND f_hWindow, WPARAM f_wParam, LPARAM f_lParam, __int32 f_nCtlPlus, __int32 f_nCtlMinus, __int32 f_nCtlEdit, __int64 f_nMin, __int64 f_nMax, __int64 f_nStep );
This procedure handles all messages belonging to a spin control pair associated with an edit control with a given range.
Windows 11 no longer supports scrollbars in a decent way (as the arrows are hidden unless hovered above) and official spin controls cannot be unlimited or use double values. So we replaced most scrollbars in dialog windows with sliders or custom spin controls made out of a '+' and a '–' button. We encourage you to use those replacements, too.
Parametersf_hWindow [HWND] Handle of the dialog window that contains the controls. f_wParam [WPARAM] The value of the wParam parameter passed to the window's callback procedure. f_lParam [LPARAM] The value of the lParam parameter passed to the window's callback procedure. f_nCtlPlus [__int32] Identification number of the '+' button. f_nCtlMinus [__int32] Identification number of the '–' button. f_nCtlEdit [__int32] Identification number of the edit control that shall be associated with the spin controls. f_nMin [__int64] Minimum value allowed in the edit control. Set to MKI_INT64_NOVAL to ignore. f_nMax [__int64] Maximum value allowed in the edit control. Set to MKI_INT64_NOVAL to ignore. f_nStep [__int64] Amount by which the current value shall be decreased/increased for each press of a button. Must be larger than zero.
Return ValueReturns true if the edit control's value was changed, else false.
CommentThis procedure should be called in the WM_COMMAND case of the dialog's window procedure:
INT_PTR CALLBACK DialogProc( HWND f_hDlg, UINT f_unMessage, WPARAM f_wParam, LPARAM f_lParam ) { __int32 nValue;
switch( f_unMessage ) { case WM_COMMAND: switch( GET_WM_COMMAND_ID( f_wParam, f_lParam ) ) { ...
default: MKI_DialogHandleSpinRange( f_hDlg, f_wParam, f_lParam, IDD_SCROLL0, IDD_SCROLL1, IDD_EDIT0, -100, 100, 10 ); break; } break; } return( false ); }
|
CAD6interface 2025.0 - Copyright 2025 Malz++Kassner® GmbH