mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 05:32:55 +00:00
Modified CalcChildScroll to work in ReactOS.
svn path=/trunk/; revision=7177
This commit is contained in:
parent
3c22c1ba77
commit
13347b6918
1 changed files with 25 additions and 3 deletions
|
@ -2097,15 +2097,18 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg )
|
||||||
*/
|
*/
|
||||||
void WINAPI CalcChildScroll( HWND hwnd, INT scroll )
|
void WINAPI CalcChildScroll( HWND hwnd, INT scroll )
|
||||||
{
|
{
|
||||||
/* FIXME */
|
|
||||||
#ifndef __REACTOS__
|
|
||||||
SCROLLINFO info;
|
SCROLLINFO info;
|
||||||
RECT childRect, clientRect;
|
RECT childRect, clientRect;
|
||||||
|
#ifndef __REACTOS__
|
||||||
HWND *list;
|
HWND *list;
|
||||||
|
#else
|
||||||
|
HWND hWndCurrent;
|
||||||
|
#endif
|
||||||
|
|
||||||
GetClientRect( hwnd, &clientRect );
|
GetClientRect( hwnd, &clientRect );
|
||||||
SetRectEmpty( &childRect );
|
SetRectEmpty( &childRect );
|
||||||
|
|
||||||
|
#ifndef __REACTOS__
|
||||||
if ((list = WIN_ListChildren( hwnd )))
|
if ((list = WIN_ListChildren( hwnd )))
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -2127,6 +2130,26 @@ void WINAPI CalcChildScroll( HWND hwnd, INT scroll )
|
||||||
}
|
}
|
||||||
HeapFree( GetProcessHeap(), 0, list );
|
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 );
|
UnionRect( &childRect, &clientRect, &childRect );
|
||||||
|
|
||||||
/* set common info values */
|
/* set common info values */
|
||||||
|
@ -2151,7 +2174,6 @@ void WINAPI CalcChildScroll( HWND hwnd, INT scroll )
|
||||||
SetScrollInfo(hwnd, scroll, &info, TRUE);
|
SetScrollInfo(hwnd, scroll, &info, TRUE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue