My goal is to have one CControlBar-derived class object which shows two objects of CListCtrl derived classes in the CMDIFrameWnd of my application. One CListCtrl object will be at the left and the other CListCtrl object will be at the right of client area of the CContrlBar object. I also like to able to move the border line between the two CListCtrl object so that I can change the viewing width of them. For exmple, if I move CListCtrl's border line to the right, the width of left CListCtrl will increase while the width of right CListCtrl will decrease. In this way, I could get similar result as that of CSplitterWnd although a CSplitterWnd object is not used.
The reason why I don't want to use CSplitterWnd is because I already have a CSplitterWnd in the CMDIFrameWnd and I don't want to show both the CSplitterWnd and the CCtontrolBar at the same time.
I guess my problem is how to put two CListCtrl objects into one CControlBar. What is the code inside of OnCreate() of CControlBar object to show two CListCtrls objects? What are the size parameters of CListCtrls?
Well, I suggest you use CDialogBar. You can create a dialog resource in the resource editor of vc IDE and put your two listCtrl into your dialog resource. Then associate your resource ID of the dialog to your CDialogBar class. Try to create the CDialogbar in your mainframe and dock it to your frame window. that's it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.