关于子窗口list控件没有滚动条的有关问题
关于子窗口list控件没有滚动条的问题
如图:
------解决思路----------------------
"最下面为一个子对话框,上面一list控件"
应该是一个 FormView 把
------解决思路----------------------
CListBox::Create
BOOL Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID );
Return Value
Nonzero if successful; otherwise 0.
Parameters
dwStyle
Specifies the style of the list box. Apply any combination of list-box styles to the box.
rect
Specifies the list-box size and position. Can be either a CRect object or a RECT structure.
pParentWnd
Specifies the list box’s parent window (usually a CDialog object). It must not be NULL.
nID
Specifies the list box’s control ID.
Remarks
You construct a CListBox object in two steps. First call the constructor, then call Create, which initializes the Windows list box and attaches it to the CListBox object.
When Create executes, Windows sends the WM_NCCREATE, WM_CREATE, WM_NCCALCSIZE, and WM_GETMINMAXINFO messages to the list-box control.
These messages are handled by default by the OnNcCreate, OnCreate, OnNcCalcSize, and OnGetMinMaxInfo member functions in the CWnd base class. To extend the default message handling, derive a class from CListBox, add a message map to the new class, and override the preceding message-handler member functions. Override OnCreate, for example, to perform needed initialization for a new class.
Apply the following window styles to a list-box control.
WS_CHILD Always
WS_VISIBLE Usually
WS_DISABLED Rarely
WS_VSCROLL To add a vertical scroll bar
WS_HSCROLL To add a horizontal scroll bar
WS_GROUP To group controls
WS_TABSTOP To allow tabbing to this control
CListBox Overview
------解决思路----------------------
Class Members
------解决思路----------------------
Hierarchy Chart
See Also CListBox::CListBox
如图:
------解决思路----------------------
"最下面为一个子对话框,上面一list控件"
应该是一个 FormView 把
------解决思路----------------------
CListBox::Create
BOOL Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID );
Return Value
Nonzero if successful; otherwise 0.
Parameters
dwStyle
Specifies the style of the list box. Apply any combination of list-box styles to the box.
rect
Specifies the list-box size and position. Can be either a CRect object or a RECT structure.
pParentWnd
Specifies the list box’s parent window (usually a CDialog object). It must not be NULL.
nID
Specifies the list box’s control ID.
Remarks
You construct a CListBox object in two steps. First call the constructor, then call Create, which initializes the Windows list box and attaches it to the CListBox object.
When Create executes, Windows sends the WM_NCCREATE, WM_CREATE, WM_NCCALCSIZE, and WM_GETMINMAXINFO messages to the list-box control.
These messages are handled by default by the OnNcCreate, OnCreate, OnNcCalcSize, and OnGetMinMaxInfo member functions in the CWnd base class. To extend the default message handling, derive a class from CListBox, add a message map to the new class, and override the preceding message-handler member functions. Override OnCreate, for example, to perform needed initialization for a new class.
Apply the following window styles to a list-box control.
WS_CHILD Always
WS_VISIBLE Usually
WS_DISABLED Rarely
WS_VSCROLL To add a vertical scroll bar
WS_HSCROLL To add a horizontal scroll bar
WS_GROUP To group controls
WS_TABSTOP To allow tabbing to this control
CListBox Overview
------解决思路----------------------
Class Members
------解决思路----------------------
Hierarchy Chart
See Also CListBox::CListBox