I know it's a really old stuff, but I'm wrecking my brain over it. Does anyone know why this is happening?
Say, when the scrollbar mouse click notification is propagated through WM_NCHITTEST
-> WM_NCLBUTTONDOWN
-> WM_SYSCOMMAND
-> WM_HSCROLL
or WM_VSCROLL
, all parameters in this chain seem to follow documentation, except SC_HSCROLL
and SC_VSCROLL
for WM_SYSCOMMAND
. So if I do:
//From within WndProc
if(message == WM_SYSCOMMAND)
{
UINT uiCmd = wParam & 0xFFF0;
if(uiCmd == SC_HSCROLL)
{
TRACE(L"Horiz scroll\n");
}
else if(uiCmd == SC_VSCROLL)
{
TRACE(L"Vertical scroll\n");
}
}
I seem to get vertical notification for horizontal and vice versa.
Here's the proof from Spy++. If I click this down arrow:
these are notifications that window receives:
All correct except SC_HSCROLL
. WTF?