LB_SETHORIZONTALEXTENT 这个函数貌似可以吧 我的MSDN很老了。。2000时代。。 http://www.hbjjrb.com/Jishu/delphi/200704/10272_2.html LB_SETHORIZONTALEXTENT An application sends an LB_SETHORIZONTALEXTENT message to set the width, in pixels, by which a list box can be scrolled horizontally (the scrollable width). If the width of the list box is smaller than this value, the horizontal scroll bar horizontally scrolls items in the list box. If the width of the list box is equal to or greater than this value, the horizontal scroll bar is hidden. To send this message, call the SendMessage function with the following parameters. SendMessage( (HWND) hWnd, // handle to destination window LB_SETHORIZONTALEXTENT, // message to send (WPARAM) wParam, // horizontal scroll width (LPARAM) lParam // not used; must be zero ); Parameters wParam Specifies the number of pixels by which the list box can be scrolled. Windows 95/98: The wParam parameter is limited to 16-bit values. lParam This parameter is not used. Return Values This message does not return a value. Res To respond to the LB_SETHORIZONTALEXTENT message, the list box must have been defined with the WS_HSCROLL style. Note that a list box does not update its horizontal extent dynamically.Requirements Windows NT/2000: Requires Windows NT 3.1 or later. Windows 95/98: Requires Windows 95 or later. Header: Declared in Winuser.h; include Windows.h.See Also List Boxes Overview, List Box Messages, LB_GETHORIZONTALEXTENT
滚动条我以前找过, 但是比较麻烦,后来自己写的
这个函数貌似可以吧
我的MSDN很老了。。2000时代。。
http://www.hbjjrb.com/Jishu/delphi/200704/10272_2.html
LB_SETHORIZONTALEXTENT
An application sends an LB_SETHORIZONTALEXTENT message to set the width, in pixels, by which a list box can be scrolled horizontally (the scrollable width). If the width of the list box is smaller than this value, the horizontal scroll bar horizontally scrolls items in the list box. If the width of the list box is equal to or greater than this value, the horizontal scroll bar is hidden. To send this message, call the SendMessage function with the following parameters. SendMessage(
(HWND) hWnd, // handle to destination window
LB_SETHORIZONTALEXTENT, // message to send
(WPARAM) wParam, // horizontal scroll width
(LPARAM) lParam // not used; must be zero
);
Parameters
wParam
Specifies the number of pixels by which the list box can be scrolled.
Windows 95/98: The wParam parameter is limited to 16-bit values. lParam
This parameter is not used.
Return Values
This message does not return a value. Res
To respond to the LB_SETHORIZONTALEXTENT message, the list box must have been defined with the WS_HSCROLL style. Note that a list box does not update its horizontal extent dynamically.Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winuser.h; include Windows.h.See Also
List Boxes Overview, List Box Messages, LB_GETHORIZONTALEXTENT