Visual Styles within Dialog Based MFC Applications? - c++

The MFC Application Wizard disables visual styles for dialog based applications.
But why?
Regardless of the wizard, can I still use the visual styles in my dialog based application (it includes toolbar and menubar)?
Thank you!

I think there's a little confusion here.
The greyed out drop-down is title "Visual Styles and colors" in my English version of VS2008. Being greyed out means that you can't modify its value, but it still reports that the resulting app will use "Windows Native/Default". When you go on and create the app and run it, themes are fully supported.
For the other application type options (single document, multiple document, multiple top-level documents), and select other non-system themes. The list is: Office 2003, VS 2005, Office 2007 of various different colors.
So whilst you don't get these non-standard Office themes, your app will have visual styles and themes as determined by the Windows settings.

Related

XAML Visual Studio 2017 cannot edit style anymore

I have Windows 10 Fall Creators Update on my PC. On Visual Studio 2017 and Blend, i can't anymore edit control's style anymore.
For exemple, i have a button in my page. I can create a style for the button by right click on it and chose option Edit Style > edit a copy... and when i create, it add style code but i can't edit it with XAML's designer.
And when i try to edit existing Style (by right click on the button option Edit Style > edit current element the option is grayed out.
anyone ever had the same problem?
EDIT 21/10/2017 : it seems that this problem comes from the designer XAML targeting the version Falls Creator Upate of Windows 10, in my projet properties, if i choose current app version Creators Update, it works but not when the project is on Fall Creators Update.
You appear to have answered your own question, effectively. But for anyone else reading, the issue is the following.
In Visual Studio 2017 version 15.4, a major architectural update to the XAML Designer was introduced (which I'll call "New XAML Designer") alongside the older XAML Designer. Visual Studio chooses a version of the XAML Designer based on the active project's target SDK: for anyone targetting Universal Windows Platform (UWP) 10.0.16299 or later (Fall Creators Update), the New XAML Designer will be used. Anything targetting an earlier UWP version, and anyone targetting Desktop .NET will get the old XAML Designer version.
Finally, the New XAML Designer is not yet feature-complete, and removed a set of existing features. One of the dropped features was "Edit Current Style."
So - the solution is to target an earlier SDK, at least for the purposes of accessing this one feature.
Links:
MSDN Blog: A Significant Update to the XAML Designer
Visual Studio 15.4 Release Notes

What is a "MFC Dialog Extension"? (Windows/C++ novice - Linux background)

I am working with a Windows C++ API which mentions MFC Dialog Extension.
What is an MFC Dialog Extension?
I have always used Linux and the resources I found online were confusing.
MFC Dialog extension is using to create GUI(s) using drag and drop options which are available in the visual studio

How can I use add and drop in visual studio 2015 c++?

I would like to build an application using C++, but I am facing a problem with the GUI. is there a simple way to make a user interface just by adding and drops buttons and labels like in Java ? Some told me to use QT but I want to use visual studio. Is it possible?
Visual Studio has a Resource Editor, that allows you to drag/drop various controls from the Toolbox panel onto your dialog. You don't really need MFC support for that.
You can use an App Wizard to create new project of a Win32 type, open its .rc file, add new dialog and start experimenting.

How to enable 'Insert Activex Control' in Visual Studio 2012 for a Win32 Dialog based application?

I am new to ActiveX Controls, though I have some basic background in COM/ATL programming.
Steps
The project is a simple Win32 project created using the Visual Studio 2012 wizard. I have selected all the default options. The dialog box is created using the resource editor dialog and then selecting new dialog option.
Problem
In my application I want to host the Internet Explorer (or some other) activex control in a dialog box. But the problem is that when I right click (as suggested by many sites and even msdn) the insert activex control ... is always disabled. I am not using MFC, but instead CAxDialogImpl (as described here).
Please suggest what I am doing wrong? How can I enable insert activex control ... in Visual Studio 2012 dialog editor?
I took considerable time to enable it, but the answer is simple: remove the macro "_APS_NO_MFC" in "resource.h" file.
A plain Win32 dialog does not have ActiveX container support, so the resource editor will not let you add the control.
You'll need to create a second project like an MFC dialog-based app, then copy the control information from its RC file.
CodeProject has some articles on using ActiveX controls without MFC, such as this one using parts of ATL - Win32 dialog helpers or this one that's pure C++ but similar to ATL's AxWindow - Use an ActiveX control in your Win32...

How to switch to the design view in VC++ 2012?

I have just installed Visual Studio 2012 Professional Edition and I'm planning to write my first Hello World application but I can't find the designer view !
How can I switch to the designer mode in Visual C++ 2012 Professional?
Maybe you are used to C#, where when you have let's say MyForm.cs and you just open it, it opens MyForm.cs [Design] window by default, in which you can design your dialog.
In Visual C++, the appearance of the dialog is stored in the resource file, thus you need to double click on Win32Project3.rc which will switch your left pane to the Resource view. Then you will see more resource types (they look like folders) and under Dialog you will find your dialog.
I found that double-clicking the header file (as shown in the Solution Explorer) opens designer view where applicable. To get the actual template, I used an online template through VS2015. Sorry if this response isn't the best, I just got a hang of it earlier today...