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

BOOL xxxShowScrollBar (PWND pwnd, UINT wBar, BOOL fShow)


Function Documentation

BOOL xxxShowScrollBar (  PWND  pwnd,
UINT  wBar,
BOOL  fShow
) 
 

Definition at line 32 of file kernel/sbapi.c.

References _InitPwSB(), BOOL, CheckLock, DWORD, FALSE, NULL, tagWND::pSBInfo, PUDF_ANIMATE, TEST_PUDF, TRUE, xxxRedrawFrame(), and xxxShowWindow().

Referenced by NtUserShowScrollBar().

00036 { 00037 BOOL fChanged = FALSE; 00038 DWORD dwStyle; 00039 00040 CheckLock(pwnd); 00041 00042 switch (wBar) 00043 { 00044 case SB_CTL: 00045 { 00046 00047 xxxShowWindow( 00048 pwnd, 00049 (fShow ? SHOW_OPENWINDOW : HIDE_WINDOW) | TEST_PUDF(PUDF_ANIMATE)); 00050 00051 return(TRUE); 00052 } 00053 00054 case SB_HORZ: 00055 dwStyle = WS_HSCROLL; 00056 break; 00057 00058 case SB_VERT: 00059 dwStyle = WS_VSCROLL; 00060 break; 00061 00062 case SB_BOTH: 00063 dwStyle = WS_HSCROLL | WS_VSCROLL; 00064 break; 00065 } 00066 00067 if (!fShow) 00068 { 00069 if (pwnd->style & dwStyle) 00070 { 00071 fChanged = TRUE; 00072 pwnd->style &= ~dwStyle; 00073 } 00074 } else { 00075 if ((pwnd->style & dwStyle) != dwStyle) 00076 { 00077 fChanged = TRUE; 00078 pwnd->style |= dwStyle; 00079 } 00080 00081 /* 00082 * Make sure that pwsb is initialized. 00083 */ 00084 if (pwnd->pSBInfo == NULL) 00085 _InitPwSB(pwnd); 00086 } 00087 00088 /* 00089 * If the state changed, redraw the frame and force WM_NCPAINT. 00090 */ 00091 if (fChanged) { 00092 00093 /* 00094 * We always redraw even if minimized or hidden... Otherwise, it seems 00095 * the scroll bars aren't properly hidden/shown when we become 00096 * visible 00097 */ 00098 xxxRedrawFrame(pwnd); 00099 } 00100 return TRUE; 00101 }


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