Hi,
I have a TFrame with TsFrameAdapter on it and AutoScroll Enabled.
I'm using:
Code:
TWinControl *wc = FindVCLWindow(pMousePos);
if(wc)
{
TPoint pCursor;
GetCursorPos(&pCursor);
TRect rc;
GetWindowRect(AFrame->Handle, &rc);
if(PtInRect(&rc, pCursor))
{
int zDelta = GET_WHEEL_DELTA_WPARAM(Msg.wParam);
if(zDelta < 0)
SendMessage(AFrame->Handle, WM_VSCROLL, SB_PAGEDOWN, 0);
else
SendMessage(AFrame->Handle, WM_VSCROLL, SB_PAGEUP, 0);
Handled=true;
}
}
To redirect a mousewheel event to the Frame for scrolling.
The problem is, that the Scrollbar is not drawn correctly, until I place my mouse cursor over the ScrollBar. Then the scrollbar is drawn at the correct position.
If I set Skinmanager Active=false, everything is drawn correctly immediatly.
Thanks for help
Best regards
Alex