mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 08:25:53 +00:00
Modified CalcChildScroll to work in ReactOS.
svn path=/trunk/; revision=7177
This commit is contained in:
parent
3c22c1ba77
commit
13347b6918
|
@ -2097,15 +2097,18 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg )
|
|||
*/
|
||||
void WINAPI CalcChildScroll( HWND hwnd, INT scroll )
|
||||
{
|
||||
/* FIXME */
|
||||
#ifndef __REACTOS__
|
||||
SCROLLINFO info;
|
||||
RECT childRect, clientRect;
|
||||
#ifndef __REACTOS__
|
||||
HWND *list;
|
||||
#else
|
||||
HWND hWndCurrent;
|
||||
#endif
|
||||
|
||||
GetClientRect( hwnd, &clientRect );
|
||||
SetRectEmpty( &childRect );
|
||||
|
||||
#ifndef __REACTOS__
|
||||
if ((list = WIN_ListChildren( hwnd )))
|
||||
{
|
||||
int i;
|
||||
|
@ -2127,6 +2130,26 @@ void WINAPI CalcChildScroll( HWND hwnd, INT scroll )
|
|||
}
|
||||
HeapFree( GetProcessHeap(), 0, list );
|
||||
}
|
||||
#else
|
||||
hWndCurrent = GetWindow(hwnd, GW_CHILD);
|
||||
while (hWndCurrent != NULL)
|
||||
{
|
||||
DWORD style = GetWindowLongW( hWndCurrent, GWL_STYLE );
|
||||
if (style & WS_MAXIMIZE)
|
||||
{
|
||||
ShowScrollBar( hwnd, SB_BOTH, FALSE );
|
||||
return;
|
||||
}
|
||||
if (style & WS_VISIBLE)
|
||||
{
|
||||
RECT WindowRect;
|
||||
|
||||
GetWindowRect( hWndCurrent, &WindowRect );
|
||||
UnionRect( &childRect, &WindowRect, &childRect );
|
||||
}
|
||||
hWndCurrent = GetWindow(hWndCurrent, GW_HWNDNEXT);
|
||||
}
|
||||
#endif
|
||||
UnionRect( &childRect, &clientRect, &childRect );
|
||||
|
||||
/* set common info values */
|
||||
|
@ -2151,7 +2174,6 @@ void WINAPI CalcChildScroll( HWND hwnd, INT scroll )
|
|||
SetScrollInfo(hwnd, scroll, &info, TRUE);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue