I have HWND of external app window. From my App I need send message (or post) to scroll window on 100px down, I mean scroll offset must be 100px.
How can be done that? I try send WN_VSCROLL with SB_LINEDOWN, but how to set 100px? and how mush pixels scrolling down by SB_LINEDOWN?
UPD2:
I try
SCROLLINFO si;
ZeroMemory(&si, sizeof(si));
si.cbSize = sizeof(si);
si.fMask = SIF_ALL;
if (GetScrollInfo(h, SB_VERT, &si))
{
si.nPos += 123;
SetScrollInfo(h, SB_VERT, &si, TRUE);
SendMessage(h, WM_VSCROLL, MAKEWPARAM(SB_THUMBTRACK, si.nPos), 0);
}
else
{
printf("no GetScrollInfo! %d", ::GetLastError());
}
and receive printf "no GetScrollInfo! 1447" (1447 is ERROR_NO_SCROLLBARS aka "The window does not have scroll bars"), but "Internet Explorer_Server" has scrollbars!