Child DialogBar
-
:cool:Hi all; I badly need a DialoogBar in my application. I have include the Dialog Bar included in "registered visual c++ components" to my project and it works just fine. The only problem is that i need to implement tab control on the DialogBar. In order to create, initialise and attach items to the tab control, i need to add a snippet. When i add the snippet in OnInitDialog for a modal dialog, it works fine. The problem is that the DialogBar is of style -> child (Not modal) and i really don't know which event to call to create the tabs on the DialogBar. Can somebody please help me on this thing. I really really need this very quick. Thank you beforehand guys; Krugger
-
:cool:Hi all; I badly need a DialoogBar in my application. I have include the Dialog Bar included in "registered visual c++ components" to my project and it works just fine. The only problem is that i need to implement tab control on the DialogBar. In order to create, initialise and attach items to the tab control, i need to add a snippet. When i add the snippet in OnInitDialog for a modal dialog, it works fine. The problem is that the DialogBar is of style -> child (Not modal) and i really don't know which event to call to create the tabs on the DialogBar. Can somebody please help me on this thing. I really really need this very quick. Thank you beforehand guys; Krugger
In order to display a tab control, you must first construct a tab control object (CTabCtrl), then create the associated Windows tab control. The easiest way to construct the object is to include it as a member variable into the CDialogBar-derived class you have made. As DialogBar's are pure child dialogs, you can use DialogDataExchange as well to bind a member variable to a control on the dialog layout resource. Being dialogs (and dialogs being Windows windows), these toolbars implement the standard Windows window creation chain. For example, you could try writing a handler for WM_CREATE, then create and initialize the tab control in there. I'm pretty sure it should work ok. -Antti Keskinen ---------------------------------------------- The definition of impossible is strictly dependant on what we think is possible.