Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

sbapi.c File Reference

#include "precomp.h"

Go to the source code of this file.

Functions

int SetScrollPos (HWND hwnd, int code, int pos, BOOL fRedraw)
BOOL SetScrollRange (HWND hwnd, int code, int posMin, int posMax, BOOL fRedraw)


Function Documentation

int SetScrollPos HWND  hwnd,
int  code,
int  pos,
BOOL  fRedraw
 

Definition at line 21 of file client/sbapi.c.

References NtUserSetScrollInfo().

Referenced by ScrollMDIChildren().

00026 { 00027 SCROLLINFO si; 00028 00029 si.fMask = SIF_POS | SIF_RETURNOLDPOS; 00030 si.nPos = pos; 00031 si.cbSize = sizeof(SCROLLINFO); 00032 00033 return((int) NtUserSetScrollInfo(hwnd, code, &si, fRedraw)); 00034 }

BOOL SetScrollRange HWND  hwnd,
int  code,
int  posMin,
int  posMax,
BOOL  fRedraw
 

Definition at line 44 of file client/sbapi.c.

References BOOL, FALSE, NtUserSetScrollInfo(), NULL, TRUE, and ValidateHwnd.

00050 { 00051 SCROLLINFO si; 00052 00053 /* 00054 * Validate the window handle first, because the further call 00055 * to NtUserSetScrollInfo will return the position of the scrollbar 00056 * and not FALSE if the hwnd is invalid 00057 */ 00058 if ( ValidateHwnd((hwnd)) == NULL) 00059 return FALSE; 00060 00061 /* 00062 * Check if the 'Range'(Max - Min) can be represented by an integer; 00063 * If not, it is an error; 00064 * Fix for Bug #1089 -- SANKAR -- 20th Sep, 1989 --. 00065 */ 00066 if ((unsigned int)(posMax - posMin) > MAXLONG) { 00067 RIPERR0(ERROR_INVALID_SCROLLBAR_RANGE, RIP_VERBOSE, ""); 00068 return FALSE; 00069 } 00070 00071 si.fMask = SIF_RANGE; 00072 si.nMin = posMin; 00073 si.nMax = posMax; 00074 si.cbSize = sizeof(SCROLLINFO); 00075 00076 NtUserSetScrollInfo(hwnd, code, &si, fRedraw); 00077 00078 return TRUE; 00079 }


Generated on Sat May 15 19:45:32 2004 for test by doxygen 1.3.7