Header in MDIChildFrameWnd
I'd like to have a header bar in an mdichildframewnd which displays a title for the current view. I'd like a toolbar to go below this.
I can create this bar overiding ondraw in a CView, but wondered if I could directly draw in the CMDIChildFrameWnd and get everything else to go below it? Using a CView involves a lot of refactoring which I'd like to avoid.
The result would be something like this:
-----------------------------------------------------
| Header
-----------------------------------------------------
| btn1 btn2 btn3
-----------------------------------------------------
The top row is my custom drawn header and the second row is a CToolBar
Re: Header in MDIChildFrameWnd
Why don't you want to use the CMDIChildFrameWnd title bar to display current view title? :confused:
Re: Header in MDIChildFrameWnd
The child frame will be maximised. I'd a nice big label to show the user where they are. It has a different background color and I'd like to put an icon there too eventually.
Re: Header in MDIChildFrameWnd
Quote:
Originally Posted by
rioch
The child frame will be maximised.
In this case the text is displayed on the MainFrame title bar!
1 Attachment(s)
Re: Header in MDIChildFrameWnd
I think you've misunderstood me. I'd like the same as what is in the attached project, but without using views.
Well without views isn't totally true. The problem is that I don't want to use more than a single view. The view needs to contain dialog resources/other views, and I want them all below the top label bar.
Additionally, I'd like a toolbar to go below that label. I've seen an answer for this somewhere (well at least to get the toolbar on the view). I'm sure it's possible to move it afterwards (hopefully).
Re: Header in MDIChildFrameWnd
Could you post a screenshot (since I have no time to test this project)?
1 Attachment(s)
Re: Header in MDIChildFrameWnd
This is the screenshot. The label bit is custom drawn (no CStatic is involved).
Re: Header in MDIChildFrameWnd
I think you should not draw in CView yourself. Nor in CMDIChildFrameWnd.
Just add a dialogbar to the CMDIChildFrameWnd and doc it on top.
Re: Header in MDIChildFrameWnd
The CDialogBar works great! Thanks. How can I set it's background colour?
Re: Header in MDIChildFrameWnd
Try OnEraseBkgnd or OnCtlColor