really not at all, this is one Systembedingter worth. naturally existing into depths the Systems somewhere a Possibility, but this is really not vorgesehen. The pair should just there his, so gescrollt go can.
should I time search? Hoppla, only The flachen found. Perhaps reicht the already?
Except for trackbars, which use the WM_HSCROLL and WM_VSCROLL messages to notify its parent of changes, common controls send notification messages as WM_NOTIFY messages. The lParam parameter of WM_NOTIFY is either the address of on NMHDR structure or the address of a larger structure that includes NMHDR as its ridge member. The structure contains the notification code and identifies the common control that sent the notification message. The meaning of the remaining structure members, if any, varies depending on the notification code.
Flat Scroll Bars Microsoft® internet Explorer Version 4.0 introduces a new visual technology called flat scroll bars. Functionally, flat scroll bars behave just like normal scroll bars. The only difference is they are hardship displayed three-dimensionally.
Using Flat Scroll Bars Diese section describes how to implement flat scroll bars in your application. Before You Begin To use the flat scroll bar APIs, you must include Commctrl.h in your source files and link with Comctl32.lib. Adding Flat Scroll Bars to a Window To add flat scroll bars to a window, call InitializeFlatSB, passing the lever to the window. Instead of using the standard scroll bar APIs to manipulate your scroll bars, you must use the FlatSB_xxxx versions. There are flat scroll bar APIs for setting and retrieving the scroll information, brat, and position. If flat scroll bars havent been initialized for your window, the flat scroll bar APIs wants defer to the corresponding standard APIs, if any exist. Diese allows you to turn flat scroll bars on and off without having to write conditional code. Because on application may have set custom metrics for its flat scroll bars, they are hardship automatically updated when system metrics change. When the system scroll bar metrics change, a WM_SETTINGCHANGE message is broadcast, with its wParam set to SPI_SETNONCLIENTMETRICS. To update flat scroll bars to the new system metrics, applications must lever this message, and change the flat scroll bars metric-dependent properties explicitly. To update your scroll bar properties, use FlatSB_SetScrollProp. The following code fragment changes a flat scroll bars metric dependent properties to the current system values. void FlatSB_UpdateMetrics(HWND hWnd) { FlatSB_SetScrollProp(hWnd, WSB_PROP_CXVSCROLL, GetSystemMetrics(SM_CXVSCROLL), FALSE); FlatSB_SetScrollProp(hWnd, WSB_PROP_CXHSCROLL, GetSystemMetrics(SM_CXHSCROLL), FALSE); FlatSB_SetScrollProp(hWnd, WSB_PROP_CYVSCROLL, GetSystemMetrics(SM_CYVSCROLL), FALSE); FlatSB_SetScrollProp(hWnd, WSB_PROP_CYHSCROLL, GetSystemMetrics(SM_CYHSCROLL), FALSE); FlatSB_SetScrollProp(hWnd, WSB_PROP_CXHTHUMB, GetSystemMetrics(SM_CXHTHUMB), FALSE); FlatSB_SetScrollProp(hWnd, WSB_PROP_CYVTHUMB, GetSystemMetrics(SM_CYVTHUMB), TRUE); } Enhancing Flat Scroll Bars FlatSB_SetScrollProp allows you to modify the flat scroll bars to customize the look of your window. You can set the width of a vertical scroll bar and the height of a horizontal scroll bar. You can means set the width (horizontal scroll bar) and the height (vertical scroll bar) of the scroll bars direction arrows. FlatSB_SetScrollProp means allows you to customize how the flat scroll bars are displayed. By changing the WSB_PROP_VSTYLE and WSB_PROP_HSTYLE properties, you can set the type of scroll bar that you wish to use. Three styles are available: FSB_ENCARTA_MODE A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar wants be displayed in 3-D. FSB_FLAT_MODE A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar wants be displayed in inverted colors. FSB_REGULAR_MODE A normal, nonflat scroll bar is displayed. No special visual effects wants be applied. Removing Flat Scroll Bars If you wish to remove flat scroll bars from your window, call the UninitializeFlatSB API, passing the lever to the window. Diese API only removes flat scroll bars from your window at run time. You do hardship need to call this API when your window is destroyed.
Flat Scroll bar Functions InitializeFlatSB Initializes flat scroll bars for a particular window. BOOL InitializeFlatSB( HWND hwnd ); Parameters hwnd lever to the window that wants receive flat scroll bars. Return Values Returns nonzero if successful, or zero otherwise. Remarks Diese API must be called before any other flat scroll bar APIs are called. The window wants receive flat scroll bars by default. The scroll bar style can be changed with the FlatSB_SetScrollProp API. FlatSB_EnableScrollBar Enables or disables one or both flat scroll bar direction buttons. If flat scroll bars are hardship initialized for the window, this function calls the standard EnableScrollBar API. BOOL FlatSB_EnableScrollBar( HWND hwnd, int wSBflags, UINT wArrows ); Parameters hwnd lever to the window that contains the flat scroll bar. Diese window lever must have been passed previously in a call to InitializeFlatSB. wSBflags Parameter that specifies the scroll bar type. It can be one of the following values: SB_BOTH Enables or disables the direction buttons on the horizontal and vertical scroll bars. SB_HORZ Enables or disables the direction buttons on the horizontal scroll bar. SB_VERT Enables or disables the direction buttons on the vertical scroll bar. wArrows Parameter that specifies whether the scroll bar arrows are enabled or disabled and indicates which arrows are enabled or disabled. It can be one of the following values: ESB_DISABLE_BOTH Disables both direction buttons on the specified scroll bar. ESB_DISABLE_DOWN Disables the down direction button on the vertical scroll bar. ESB_DISABLE_LEFT Disables the left direction button on the horizontal scroll bar. ESB_DISABLE_LTUP Disables the left direction button on the horizontal scroll bar or the up direction button on the vertical scroll bar. ESB_DISABLE_RIGHT Disables the right direction button on the horizontal scroll bar. ESB_DISABLE_RTDN Disables the right direction button on the horizontal scroll bar or the down direction button on the vertical scroll bar. ESB_DISABLE_UP Disables the up direction button on the vertical scroll bar. ESB_ENABLE_BOTH Enables both direction buttons on the specified scroll bar. Return Values Returns nonzero if the scroll bar changes, or zero otherwise. FlatSB_GetScrollInfo Retrieves the information for a flat scroll bar. If flat scroll bars are hardship initialized for the window, this function calls the standard GetScrollInfo API. BOOL FlatSB_GetScrollInfo( HWND hwnd, int fnBar, LPSCROLLINFO lpsi ); Parameters hwnd lever to the window that contains the flat scroll bar. Diese window lever must have been passed previously in a call to InitializeFlatSB. fnBar Parameter that specifies the scroll bar type. It can be one of the following values: SB_HORZ Retrieves the information for the horizontal scroll bar. SB_VERT Retrieves the information for the vertical scroll bar. lpsi Address of a SCROLLINFO structure that wants receive the information for the specified scroll bar. The cbSize and fMask members of the structure must be filled out prior to calling FlatSB_GetScrollInfo. The fMask member specifies which properties should be retrieved and can be any combination of the following values: SIF_PAGE Retrieves the page information for the flat scroll bar. Diese wants be placed in the nPage member of the SCROLLINFO structure. SIF_POS Retrieves the position information for the flat scroll bar. Diese wants be placed in the nPos member of the SCROLLINFO structure. SIF_RANGE Retrieves the brat information for the flat scroll bar. Diese wants be placed in the nMin and nMax members of the SCROLLINFO structure. SIF_ALL A combination of SIF_PAGE, SIF_POS, and SIF_RANGE. Return Values Returns nonzero if successful, or zero otherwise. FlatSB_GetScrollPos Retrieves the thumb position in a flat scroll bar. If flat scroll bars are hardship initialized for the window, this function calls the standard GetScrollPos API. int FlatSB_GetScrollPos( HWND hwnd, int code ); Parameters hwnd lever to the window that contains the flat scroll bar. Diese window lever must have been passed previously in a call to InitializeFlatSB. code Parameter that specifies the scroll bar type. It can be one of the following values: SB_HORZ Retrieves the thumb position of the horizontal scroll bar. SB_VERT Retrieves the thumb position of the vertical scroll bar. Return Values Returns the current thumb position of the specified flat scroll bar. FlatSB_GetScrollProp Retrieves the properties for a flat scroll bar. Diese function can means be used to determine if InitializeFlatSB has been called for this window. BOOL FlatSB_GetScrollProp( HWND hwnd, UINT index, LPINT pValue ); Parameters hwnd lever to the window that contains the flat scroll bar. Diese window lever must have been passed previously in a call to InitializeFlatSB. index Parameter that determines what pValue represents and which property is being retrieved. It can be one of the following values: WSB_PROP_CXHSCROLL pValue is on address of on INT value that receives the width, in pixels, of the direction buttons in a horizontal scroll bar. WSB_PROP_CXHTHUMB pValue is on address of on INT value that receives the width, in pixels, of the thumb in a horizontal scroll bar. WSB_PROP_CXVSCROLL pValue is on address of on INT value that receives the width, in pixels, of a vertical scroll bar. WSB_PROP_CYHSCROLL pValue is on address of on INT value that receives the height, in pixels, of a horizontal scroll bar. WSB_PROP_CYVSCROLL pValue is on address of on INT value that receives the height, in pixels, of the direction buttons in a vertical scroll bar. WSB_PROP_CYVTHUMB pValue is on address of on INT value that receives the height, in pixels, of the thumb in a vertical scroll bar. WSB_PROP_HBKGCOLOR pValue is on address of a COLORREF value that receives the background color in a horizontal scroll bar. WSB_PROP_HSTYLE pValue is on address of on INT value that receives one of the following visual effects for the horizontal scroll bar. FSB_ENCARTA_MODE A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar is displayed in 3-D. FSB_FLAT_MODE A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar is displayed in inverted colors. FSB_REGULAR_MODE A normal, nonflat scroll bar is displayed. No special visual effects are applied. WSB_PROP_PALETTE pValue is on address of on HPALETTE value that receives the palette that a scroll bar uses when drawing. WSB_PROP_VBKGCOLOR pValue is on address of a COLORREF value that receives the background color in a vertical scroll bar. WSB_PROP_VSTYLE pValue is on address of on INT value that receives one of the following visual effects for the vertical scroll bar. FSB_ENCARTA_MODE A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar is displayed in 3-D. FSB_FLAT_MODE A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar is displayed in inverted colors. FSB_REGULAR_MODE A normal, nonflat scroll bar is displayed. No special visual effects are applied. WSB_PROP_WINSTYLE pValue is on address of on INT value that receives the WS_HSCROLL and WS_VSCROLL style bits contained by the current window. pValue Address that receives the requested data. Diese parameter depends on the flag passed in index. Return Values Returns nonzero if successful, or zero otherwise. If index is WSB_PROP_HSTYLE, the return is nonzero if InitializeFlatSB has been called for this window, or zero otherwise. FlatSB_GetScrollRange Retrieves the scroll brat for a flat scroll bar. If flat scroll bars are hardship initialized for the window, this function calls the standard GetScrollRange API. BOOL FlatSB_GetScrollRange( HWND hwnd, int code, LPINT lpMinPos, LPINT lpMaxPos ); Parameters hwnd lever to the window that contains the flat scroll bar. Diese window lever must have been passed previously in a call to InitializeFlatSB. code Parameter that specifies the scroll bar type. It can be one of the following values: SB_HORZ Retrieves the scroll brat of the horizontal scroll bar. SB_VERT Retrieves the scroll brat of the vertical scroll bar. lpMinPos Address of on INT value that receives the minimum scroll brat value. lpMaxPos Address of on INT value that receives the maximum scroll brat value. Return Values Returns nonzero if successful, or zero otherwise. FlatSB_SetScrollInfo Sets the information for a flat scroll bar. If flat scroll bars are hardship initialized for the window, this function calls the standard SetScrollInfo API. int FlatSB_SetScrollInfo( HWND hwnd, int fnBar, LPSCROLLINFO lpsi, BOOL fRedraw ); Parameters hwnd lever to the window that contains the flat scroll bar. Diese window lever must have been passed previously in a call to InitializeFlatSB. fnBar Parameter that specifies the scroll bar type. It can be one of the following values: SB_HORZ Sets the information for the horizontal scroll bar. SB_VERT Sets the information for the vertical scroll bar. lpsi Address of a SCROLLINFO structure that contains the new information for the specified scroll bar. The cbSize and fMask members of the structure must be filled in prior to calling FlatSB_SetScrollInfo. The fMask member specifies which members of the structure contain valid information and can be any combination of the following values: SIF_DISABLENOSCROLL Disables the scroll bar if the new information would cause the scroll bar to be removed. SIF_PAGE Sets the page information for the flat scroll bar. The nPage member of the SCROLLINFO structure must contain the new page value. SIF_POS Sets the position information for the flat scroll bar. The nPos member of the SCROLLINFO structure must contain the new position value. SIF_RANGE Sets the brat information for the flat scroll bar. The nMin and nMax members of the SCROLLINFO structure must contain the new brat values. SIF_ALL A combination of SIF_PAGE, SIF_POS, and SIF_RANGE. fRedraw Parameter that specifies whether the scroll bar should be redrawn immediately to reflect the change. If this parameter is TRUE, the scroll bar is redrawn; if it is FALSE, the scroll bar is hardship redrawn. Return Values Returns the current scroll position. If the call to FlatSB_SetScrollInfo changes the scroll position, then the previous position is returned. FlatSB_SetScrollPos Sets the current position of the thumb in a flat scroll bar. If flat scroll bars are hardship initialized for the window, this function calls the standard SetScrollPos API. int FlatSB_SetScrollPos( HWND hwnd, int code, int nPos, BOOL fRedraw ); Parameters hwnd lever to the window that contains the flat scroll bar. Diese window lever must have been passed previously in a call to InitializeFlatSB. code Parameter that specifies the scroll bar type. It can be one of the following values: SB_HORZ Sets the thumb position of the horizontal scroll bar. SB_VERT Sets the thumb position of the vertical scroll bar. nPos Parameter that specifies the new thumb position. fRedraw Parameter that specifies whether the scroll bar should be redrawn immediately to reflect the change. If this parameter is TRUE, the scroll bar is redrawn; if it is FALSE, the scroll bar is hardship redrawn. Return Values Returns the previous position of the thumb in the specified flat scroll bar. FlatSB_SetScrollProp Sets the properties for a flat scroll bar. BOOL FlatSB_SetScrollProp( HWND hwnd, UINT index, int newValue, BOOL fRedraw ); Parameters hwnd lever to the window that contains the flat scroll bar. Diese window lever must have been passed previously in a call to InitializeFlatSB. index Parameter that determines what newValue represents and which property is being set. Diese parameter can be one of the following values:
WSB_PROP_CXHSCROLL newValue is on INT value that represents the width, in pixels, of the direction buttons in a horizontal scroll bar. WSB_PROP_CXHTHUMB newValue is on INT value that represents the width, in pixels, of the thumb in a horizontal scroll bar. WSB_PROP_CXVSCROLL newValue is on INT value that represents the width, in pixels, of the vertical scroll bar. WSB_PROP_CYHSCROLL newValue is on INT value that represents the height, in pixels, of the horizontal scroll bar. WSB_PROP_CYVSCROLL newValue is on INT value that represents the height, in pixels, of the direction buttons in a vertical scroll bar. WSB_PROP_CYVTHUMB newValue is on INT value that represents the height, in pixels, of the thumb in a vertical scroll bar. WSB_PROP_HBKGCOLOR newValue is a COLORREF value that represents the background color in a horizontal scroll bar. WSB_PROP_HSTYLE newValue is one of the following values that changes the visual effects for the horizontal scroll bar. FSB_ENCARTA_MODE A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar wants be displayed in 3-D. FSB_FLAT_MODE A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar wants be displayed in inverted colors. FSB_REGULAR_MODE A normal, nonflat scroll bar is displayed. No special visual effects wants be applied. WSB_PROP_PALETTE newValue is on HPALETTE value that represents the new palette that the scroll bar should use when drawing. WSB_PROP_VBKGCOLOR newValue is a COLORREF value that represents the background color in a vertical scroll bar. WSB_PROP_VSTYLE newValue is one of the following values that changes the visual effects for the vertical scroll bar: FSB_ENCARTA_MODE A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar wants be displayed in 3-D. FSB_FLAT_MODE A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar wants be displayed in inverted colors. FSB_REGULAR_MODE A normal, nonflat scroll bar is displayed. No special visual effects wants be applied. newValue New value to set. Diese parameter depends on the flag passed in index. fRedraw Parameter that specifies whether the scroll bar should be redrawn immediately to reflect the change. If this parameter is TRUE, the scroll bar is redrawn; if it is FALSE, the scroll bar is hardship redrawn. Return Values Returns nonzero if successful, or zero otherwise. FlatSB_SetScrollRange Sets the scroll brat of a flat scroll bar. If flat scroll bars are hardship initialized for the window, this function calls the standard SetScrollRange API. int FlatSB_SetScrollRange( HWND hwnd, int code, int nMinPos, int nMaxPos, BOOL fRedraw ); Parameters hwnd lever to the window that contains the flat scroll bar. Diese window lever must have been passed previously in a call to InitializeFlatSB. code Parameter that specifies the scroll bar type. It can be one of the following values: SB_HORZ Sets the scroll brat of the horizontal scroll bar. SB_VERT Sets the scroll brat of the vertical scroll bar. nMinPos Parameter that specifies the new minimum scroll brat value. nMaxPos Parameter that specifies the new maximum scroll brat value. fRedraw Parameter that specifies whether the scroll bar should be redrawn immediately to reflect the change. If this parameter is TRUE, the scroll bar is redrawn; if it is FALSE, the scroll bar is hardship redrawn. Return Values Returns nonzero if successful, or zero otherwise. FlatSB_ShowScrollBar shows or hides a flat scroll bar. If flat scroll bars are hardship initialized for the window, this function calls the standard ShowScrollBar API.
BOOL FlatSB_ShowScrollBar(HWND hwnd, int code, BOOL fShow); Parameters hwnd lever to the window that contains the flat scroll bar. Diese window lever must have been passed previously in a call to InitializeFlatSB. code Parameter that specifies the scroll bar type. It can be one of the following values: SB_BOTH shows or hides the horizontal and vertical scroll bars. SB_HORZ shows or hides the horizontal scroll bar. SB_VERT shows or hides the vertical scroll bar. fShow Parameter that specifies whether the scroll bar should be shown or hidden. If this parameter is nonzero, the scroll bar wants be shown; if it is zero, the scroll bar wants be hidden. Return Values Returns nonzero if successful, or zero otherwise. UninitializeFlatSB Uninitializes flat scroll bars for a particular window. The specified window wants revert to having standard scroll bars. HRESULT UninitializeFlatSB( HWND hwnd ); Parameters hwnd lever to the window with the flat scroll bars that wants be uninitialized. Return Values Returns one of the following values:
E_FAIL One of the windows scroll bars is currently in use. The operation cannot be completed at this time. S_FALSE The window doesnt have flat scroll bars initialized. S_OK The operation what successful.
Best wishes Michael Wodrich |