Common Controls Plugins for MFC like in c#? - 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.

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.

In MSVC there are such things as MFC custom controls (design time), is there a such thing as a win32 custom control?

In microsoft visual c++ (visual studio) one can create design time controls that you drag and drop on to your dialogs using MFC.
For example http://www.codeproject.com/Articles/521/Creating-Custom-Controls
My question is: can one develop win32 custom controls that you can drag and drop onto your dialog at design time, without using MFC? Or with win32 programming are you stuck with the controls that win32 offers you (i.e. edit, listbox, checkbox, etc.).
Does the visual studio c++ ide only allow you to create mfc custom controls at design time, and with win32 you must create custom controls at run time?
It is true you are more limited as for having the option to select a control from the Toolbox, which is easy with MFC. However, you can create or use custom controls for a Win32 project, and yet, such controls will be fancy and professionally looking project that doesn’t support MFC.
These custom controls will be either static libraries, DLLs or just c++ classes.
Here is an example.

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

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.

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.

Need a good unmanaged C++ OCX example

I need a very simple and clear example of how to create an OCX in unmanaged C++ code. Ideally, I'd like to consume it in Office, but any container (i.e. VB6, .NET WinForms) should be good.
I am having trouble seeing how I can add controls to the OCX canvas... I have seen examples of opening dialogs from within the OCX's load event... but that is not what I want... I need the GUI in the OCX itself.
Have you looked at this Microsoft tutorial. It uses MFC. If you want to create a windowless control you would need to use ATL.