|
-
January 19th, 2011, 03:25 AM
#16
Re: Can we use CHeaderCtrl directly?
 Originally Posted by VictorN
No, the header control in the list control with the LVS_REPORT style is always a child of list control window, not a dialog, nor formview. Just use Spy++ and you will see it.
Sorry, that is not true for a seperate CHeaderCtrl as requested by the OP. The CListCtrl has an embedded CHeaderCtrl which you can see in Spy. But when you intend to have a separete header for that list control, spreadsheet, tree or what ever you 'usually' make the dialog or formview parent of this header control. I've made already two MFC projects where this design has been applied.
Se also younger docs like in http://msdn.microsoft.com/en-us/libr...(v=VS.80).aspx
Also note that of course you may use any CWnd created before as parent for a header control. But a dialog and formview (or a customized list control) surely are better candidates as they already provide a working message map and a proper initial function that was called after the window and child windows were created and before the window initially was displayed.
-
January 19th, 2011, 03:56 AM
#17
Re: Can we use CHeaderCtrl directly?
 Originally Posted by itsmeandnobodyelse
 Originally Posted by VictorN
No, the header control in the list control with the LVS_REPORT style is always a child of list control window, not a dialog, nor formview. Just use Spy++ and you will see it.
...
It may be a child of a dialog as well as of any other window. 
Sorry, that is not true for a seperate CHeaderCtrl as requested by the OP. The CListCtrl has an embedded CHeaderCtrl which you can see in Spy.
What is "not true"? 
Do you read only some small parts of my posts? 
Note, that you have confirmed what I wrote in your next sentence after your "that is not true"! 
Well, I suggest you to close our discussion and more carefully read the posts of the guys here. 
Good luck.
Victor Nijegorodov
-
January 19th, 2011, 04:18 AM
#18
Re: Can we use CHeaderCtrl directly?
It is not true that CHeaderCtrl is always a child of CListCtrl, not of dialog and formview.
If you meant with this that CListCtrl always has an embedded CHeaderCtrl as child window, it is not how I read that (and I don't understand the 'not of dialog and formview' trailer, nor the remark about MSDN you made before, if you meant it that way). In any case it doesn't seem a reason for me to getting rude as neither you or me seem to be a native speaker.
-
January 19th, 2011, 04:23 AM
#19
Re: Can we use CHeaderCtrl directly?
 Originally Posted by itsmeandnobodyelse
It is not true that CHeaderCtrl is always a child of CListCtrl, not of dialog and formview.
Then please, give us an example of a standard CListCtrl with the LVS_REPPORT style, which header control is a child of the dialog or formview.
Victor Nijegorodov
-
January 19th, 2011, 06:09 AM
#20
Re: Can we use CHeaderCtrl directly?
 Originally Posted by VictorN
Then please, give us an example of a standard CListCtrl with the LVS_REPPORT style, which header control is a child of the dialog or formview. 
The OP's question is to 'use a header control directly' what in my opinion means not to use the embedded header control of the list control but a second one. That is also the alternative MS describes in the docs and they recommend a view based class for the alternative. I will show an example of such a separate header control associated with a list control and the embedded header control disabled if the OP is interested to that. I would make the parent window a CDockablePane but it seems that it is a new class of VS2010 while I have only VS2008 available.
-
January 20th, 2011, 08:12 PM
#21
Re: Can we use CHeaderCtrl directly?
I was too scare to continue with this discussion and start to get myself confuse as I just a newbie.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|