Today I am faced with an issue of incrementing and decrementing my updown controls in WINAPI.
I have an image below of my updown control. It is buddied with an edit control
What I would want this control is to increment/decrement by 1 respectively when the arrow keys are pressed. I have tried the style: UDS_ARROWKEYS, but it doesn't work leading me to believe there's another method to solve this problem.
I have written a snippet to reproduce the image above.
HWND edit1 = CreateWindowEx(WS_EX_CLIENTEDGE, L"EDIT", L"250", WS_VISIBLE | WS_CHILD | ES_CENTER | ES_NUMBER...
HWND upDown1 = CreateWindow(L"MSCTLS_UPDOWN32", L"", WS_VISIBLE | WS_CHILD | UDS_ALIGNRIGHT...
SendMessage(upDown1, UDM_SETBUDDY, reinterpret_cast<WPARAM>(edit1), static_cast<LPARAM>(NULL));
Enable the
UDS_SETBUDDYINT
style on the Up-Down control:Up-Down Control Styles
This is stated in the Up-Down Control Overviews documentation:
About Up-Down Controls