Added handling of SBM_GETSCROLLBARINFO message.

This commit is contained in:
Vitaly Lipatov 2005-01-09 16:35:41 +00:00 committed by Alexandre Julliard
parent 56dbf7fb21
commit 386cf457c9
2 changed files with 29 additions and 1 deletions

View File

@ -106,7 +106,7 @@ static const unsigned int message_pointer_flags[] =
/* 0xc0 - 0xdf */
SET(EM_REPLACESEL) | SET(EM_GETLINE) | SET(EM_SETTABSTOPS),
/* 0xe0 - 0xff */
SET(SBM_GETRANGE) | SET(SBM_SETSCROLLINFO) | SET(SBM_GETSCROLLINFO),
SET(SBM_GETRANGE) | SET(SBM_SETSCROLLINFO) | SET(SBM_GETSCROLLINFO) | SET(SBM_GETSCROLLBARINFO),
/* 0x100 - 0x11f */
0,
/* 0x120 - 0x13f */
@ -499,6 +499,13 @@ static size_t pack_message( HWND hwnd, UINT message, WPARAM wparam, LPARAM lpara
case SBM_GETSCROLLINFO:
push_data( data, (SCROLLINFO *)lparam, sizeof(SCROLLINFO) );
return sizeof(SCROLLINFO);
case SBM_GETSCROLLBARINFO:
{
const SCROLLBARINFO *info = (const SCROLLBARINFO *)lparam;
size_t size = min( info->cbSize, sizeof(SCROLLBARINFO) );
push_data( data, info, size );
return size;
}
case EM_GETSEL:
case SBM_GETRANGE:
case CB_GETEDITSEL:
@ -724,6 +731,9 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
case SBM_GETSCROLLINFO:
if (!get_buffer_space( buffer, sizeof(SCROLLINFO ))) return FALSE;
break;
case SBM_GETSCROLLBARINFO:
if (!get_buffer_space( buffer, sizeof(SCROLLBARINFO ))) return FALSE;
break;
case EM_GETSEL:
case SBM_GETRANGE:
case CB_GETEDITSEL:
@ -999,6 +1009,9 @@ static void unpack_reply( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam,
case SBM_GETSCROLLINFO:
memcpy( (SCROLLINFO *)lparam, buffer, min( sizeof(SCROLLINFO), size ));
break;
case SBM_GETSCROLLBARINFO:
memcpy( (SCROLLBARINFO *)lparam, buffer, min( sizeof(SCROLLBARINFO), size ));
break;
case EM_GETRECT:
case CB_GETDROPPEDCONTROLRECT:
case LB_GETITEMRECT:

View File

@ -2118,6 +2118,7 @@ typedef PVOID *LPMENUTEMPLATE;
#define SBM_SETRANGEREDRAW 0x00e6
#define SBM_SETSCROLLINFO 0x00e9
#define SBM_GETSCROLLINFO 0x00ea
#define SBM_GETSCROLLBARINFO 0x00eb
/* Scrollbar info */
typedef struct tagSCROLLINFO
@ -2133,6 +2134,19 @@ typedef struct tagSCROLLINFO
typedef const SCROLLINFO *LPCSCROLLINFO;
#define CCHILDREN_SCROLLBAR 5
typedef struct tagSCROLLBARINFO
{
DWORD cbSize; /* Size of SCROLLBARINFO struct */
RECT rcScrollBar; /* Coordinates of the scroll bar */
INT dxyLineButton; /* Height or width */
INT xyThumbTop; /* Position of the top or the left */
INT xyThumbBottom; /* Position of the bottom or the right */
INT reserved;
DWORD rgstate[CCHILDREN_SCROLLBAR+1];
} SCROLLBARINFO, *PSCROLLBARINFO, *LPSCROLLBARINFO;
/* GetScrollInfo() flags */
#define SIF_RANGE 0x0001
#define SIF_PAGE 0x0002
@ -4239,6 +4253,7 @@ HANDLE WINAPI GetPropW(HWND,LPCWSTR);
#define GetProp WINELIB_NAME_AW(GetProp)
DWORD WINAPI GetQueueStatus(UINT);
BOOL WINAPI GetScrollInfo(HWND,INT,LPSCROLLINFO);
BOOL WINAPI GetScrollBarInfo(HWND,LONG,LPSCROLLBARINFO);
INT WINAPI GetScrollPos(HWND,INT);
BOOL WINAPI GetScrollRange(HWND,INT,LPINT,LPINT);
HWND WINAPI GetShellWindow(void);