Creating the Header Control
The header control is not directly available in the dialog editor (although you can add a list control, which includes a header control).
To put a header control in a dialog box
Manually embed a member variable of type CHeaderCtrl in your dialog class.
In OnInitDialog, create and set the styles for the
CHeaderCtrl
, position it, and display it.Add items to the header control.
Use the Class Wizard to map handler functions in the dialog class for any header-control notification messages you need to handle (see Mapping Messages to Functions).
To put a header control in a view (not a CListView)
Embed a CHeaderCtrl object in your view class.
Style, position, and display the header control window in the view's OnInitialUpdate member function.
Add items to the header control.
Use the Class Wizard to map handler functions in the view class for any header-control notification messages you need to handle (see Mapping Messages to Functions).
In either case, the embedded control object is created when the view or dialog object is created. Then you must call CHeaderCtrl::Create to create the control window. To position the control, call CHeaderCtrl::Layout to determine the control's initial size and position and SetWindowPos to set the position you want. Then add items as described in Adding Items to the Header Control.
For more information, see Creating a Header Control in the Windows SDK.
See also
Tilbakemeldinger
https://aka.ms/ContentUserFeedback.
Kommer snart: Gjennom 2024 faser vi ut GitHub Issues som tilbakemeldingsmekanisme for innhold, og erstatter det med et nytt system for tilbakemeldinger. Hvis du vil ha mer informasjon, kan du se:Send inn og vis tilbakemelding for