C++, MFC, tabbed document interface application, Win32 - c++

Is MFC only way or easiest way to craete tabbed document interface application in C++? Is there a way using plain Win32 project to create tabbed document interface application?

MFC is not deprecated.
Yes, It is much easier to use MFC to create tabbed document interface.
Please choose MFC or similar framework instead of directly dealing with UI in Win32 unless you have a very strong reason.

Related

How can I implement a MFC resource within a Win32 window?

I have two projects, an old project using the Win32 API that has an old toolbar using Win32 graphics and another one using MFC code with better graphics (I am creating a ribbon toolbar similar to the one that Microsoft Office uses). The MFC classes I use inherit from CDialogEx and CWinApp.
What I am trying to do is to place the ribbon toolbar in my Win32 window and replace the old one. I am already referencing the MFC project using it as a static library and can call the classes from my Win32 project but I can't get to show the new toolbar yet.
What do I need to do in order to achieve this?
It might be much easier to create the freamework with the MFC and move the old code into the new framework.
It is possible to create a MFC project without Doc/View architecture.
The MFC Ribbons will and can only live inside a CMFCFrameWnd that is part of a CWinAppEx... extracting just the ribbon code into a plain Win32 application should fail.
But there is also a Win32 Ribbon Framework. It might be much easier to implement this into your old Win32 project.
How to implement this is described here.
In Codeproject you find a sample how to use it.

Common Controls Plugins for MFC like in c#?

I'm working with MFC VC++ Application. I would like to use simple UI like in c# NumericUpdown & openFile Dialog & SavefileDialog etc in my application. I would like to know is there any wrapper or plugin for MFC to do this process? Because it is too messy to add a simple control using MFC when comparing to C# .Net! Is there library or plugin to reduce this task? Preferably a free one.
Maybe you just don't know how to do it? In an MFC app controls are easily added by dragging them from a toolbar onto a dialog template. That is the "Visual" part of Visual C++.
And the open and save dialog are available using MFC class CFileDialog.

ActiveX control in C++ form based application

Is it possible to use ActiveX control in C++ form based application like we use in MFC dialog based applications?
Yes, you can host an ActiveX control in WinForms using the AxHost class.

how to add windows form in mfc application?

i wanna know how to add windows form to the MFC application (Dialog-based) and connect it with the MFC Dialogs,so i can program with visual c++ ?
http://www.functionx.com/visualc/Lesson04.htm
I think this is what you are looking for, hope this helps.
The MFC class CWinFormsControl "provides the basic functionality for hosting of a Windows Forms control in a MFC application".
One can encapsulate more Winform standard controls in a .NET custom control (derived from the System.Windows.Forms.Control class) and then use it in the MFC app through the CWinFormsControl.
The MFC application must use the /clr flag (Common Language Runtime Support).

Controls on main window using Visual C++ designer?

Is is possible to draw controls using Visual C++ designer on the main window, in the same way you can design dialogs? I'd preferably like to be able to design the main window controls this way without using MFC, rather than creating them on WM_CREATE.
EDIT: I don't want a dialog-based app, just to be able to design the main window graphically similar to what can be done using Windows Forms Designer in .NET?
Your options are:
Use MFC and create a main window that has a dialog view (based on the CFormView class).
Use WinForms/.NET
Use Qt.
If you're starting a new project and you want to stick with C++, then I highly recommend Qt. Not only is it an excellent framework, but it's cross-platform so your app could be built on Linux and the Mac.
http://www.qtsoftware.com/products/
A Visual C++ plugin is available and you can design your main window visually using a tool called Qt Designer.
I'm not sure if I understand what you want your app to look like. If you want your application to be a dialog, then make it a dialog app.
Just create a new MFC Application, and set it to "Dialog based". Now your application will start at that dialog.
If you want to use a native win32 app, just create the dialog in your InitInstance, using CreateDialog (instead of CreateWindow).
In both cases, you use the resource editor to create the dialog.