Show Toolbars and Docking Windows in MFC Dialog during Debug

98 Views Asked by At

I have a previous MFC Application in Visual Studio that displays various Toolbars and Docking Windows in the application dialog while debugging (in particular, the Output window with Build, Debug, and Find tabs).

MFC Dialog

The above app was created as a CFormView.

In a new MFC App (created as a CDialogEx), I am unable to show the same the Toolbars and Docking Windows, and cannot any settings in Visual Studio to enable them. Any idea where such settings for the MFC application dialog can be found? Perhaps this is just a difference between CFormView and CDialogEx?

2

There are 2 best solutions below

0
Constantine Georgiou On BEST ANSWER

Quite simple, a "Dialog-based MFC Application" uses a dialog-box (CDialog- or CDialogEx-derived) as the application's main window, while your previous application uses a normal "Overlapped" one (CFrameWnd-derived).

The Wizard can create a new SDI project, ie an application frame, containing a CView- (or other view-types, like CScrollView-, CFormView- etc) derived view, a document class (you can unselect the "Doc/View Architecture" option, if you don't want it), and depending on the options you select, a number of dockable windows like a menu bar, toolbar(s), status-bar, navigation or "project" panes, output window etc. You have to make these decisions early, as it's not very easy to add these later; this can save you much work. All the above (incl the View window) are children of the frame window (CMainFrame). These options are not available for a dialog-based MFC application, as far as I'm aware of.

0
Dou Xu-MSFT On

Perhaps this is just a difference between CFormView and CDialogEx?

I think so.The type of application you select determines the user interface options that are available for your application.

Unlike CFormView, a CDialogEx does not have an associated document or frame window (such as SDI or MDI).

A dialog application just shows a dialog (and whatever controls you put in the dialog, etc.)

A FormView gives you a fairly normal application with a main menu and such -- but the view part can also hold controls.

Summary:

CFormView is part of the document/view architecture, suitable for complex forms within an application. CDialogEx represents a standalone dialog box, often used for quick interactions.

For more information, please refer to application-type-mfc-application-wizard

Hope it can help you.