Why is CTabCtrl background white, not the colour of the dialog - visual-c++

Within Visual Studio 2017 I created an MFC dialog-based application from scratch. In the dialog editor I dropped a Tab Control on then used Add Variable... to create a data member of type CTabCtrl and added a couple of lines in OnInitDialog() to create some empty tabs. The result is here:
When I add content (dialogs) to the tabs, and the dialogs are smaller than the tab control, the white background looks especially ugly.
If I do the same in Visual Studio 2008 the background is grey, like the dialog.
My questions are:
Why did this change from VS2008 to VS2017?
What can I do simply to make the background the same as the dialog? My current fix is to derive from CTabCtrl, and handle WM_ERASEBKGND and WM_PAINT (as mentioned here) which is much more code than I want to support.

Related

Visual Studio 2019 Color Theme Editor - How to make background color of Solution Explorer transparent?

Goal: I'm using a VS extension called "ClaudiaIDE" that enables you to set an image as a background to Visual Studio 2019. I set the background to a wood grain wallpaper (it looks amazing). It makes the code editor background and main window background transparent so you can see the image, but not anything else. I then started using Color Theme Editor to add transparency to other sections of the VS IDE so it's mostly showing the background image. I want the right side windows (like solution explorer) to be transparent as well.
Two stackoverflow answers say the color value is stored under "treeview". I changed the "treeview" background using the wizard but it made no difference (despite other SO comments saying it worked). Likely due to the old answers being for VS 2017 or earlier.
I then changed the "treeview" color manually in the CustomTheme.vstheme file and I successfully made the grey color transparent, but now there is an absolute black blackground, which was perhaps there to give a shadow effect. The code I edited is below (The opacity is intentional):
<Category Name="TreeView" GUID="{92ecf08e-8b13-4cf4-99e9-ae2692382185}">
<Color Name="Background">
<Background Type="CT_RAW" Source="00252526" />
<Foreground Type="CT_RAW" Source="FFF1F1F1" />
</Color>
I searched for every reference of "#FF000000" and for testing made them all fully transparent: "#00000000". This made no difference, solution explorer retained its "#FF000000" (by observation only, I don't know where the code is). I know the hex is right because I copied a screenshot into paint.net and grabbed the color.
I then changed my Microsoft Windows settings so that it didn't use the dark background, in case it was applying that to the VS windows. No change.
If anyone has any ideas on how to access the black underlying background for windows like "solution explorer" i would greatly appreciate it. It must be getting that value from somewhere.
Install this:
https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.VisualStudio2019ColorThemeEditor
Top menu:
Tool=>Customize Colors => choose theme
Show All Elements button (same row with save icon)
Search for (there is search box):
Environment → ToolWindowFloatingFrameInactive
Environment → ToolWindowFloatingFrame
Tool Window → Tab → Background
TreeView → Background

Create DUPLICATE code window in visual studio 2012

I want one code window to have two duplicates. I want to place one code window on one monitor, and second code window on the second, extended monitor.
As I Go on typing, I want second window to display the code that I type on the first monitor. Is it possible in visual studio 2012?
It would be very helpful for me while teaching the trainees.
I haven't got a copy installed here to test but I believe the answer you're looking for lies hidden under the Window menu..
Activate the window you wish to duplicate and under Window on the toolbar choose New Window. This will create a duplicate of the active document. Under the Window menu again you should find the option to make the window Floating
Update for Visual Studio 2013: Vertical split of cshtml window in VS2013
In VS2012, the feature closest to what you are after is called "Split" and its under the Window menu when you have a code file selected. This creates a split view of the selected code file within the original window.
I don't know of any way to seperate the copies from each other and float them on different screens.

What is this "pull down" icon in Visual Studio 2012 text editor used for?

The icon below shows at the top of the vertical scrollbar in Visual Studio 2012's text editor. When I drag it down, another page shows behind the current visible page. It looks like a copy of it. (I am using dark theme)
What is it used for? I don't know what the feature is called, therefore I couldn't search for it. I am not sure if it's native to VS 2012 or it's from one of the VS add-ons I am using.
Sometimes the icon disappears. Why?
It's for split viewing of a file. So you can view part of the file and edit another part.
It's a common feature in advanced text editors.

How to skin MFC main menu

I got a menu in an existing MFC application that has a standard MFC main menu.
But I would like to change its background colour so that it appears to more seamlessly belong to the rest of the application.
First picture: An MFC main menu. The application is skinned blue, as seen in the toolbar, but the menu is still standard grey background colour.
Second Picture: Spotify's menu, skinned to fit into the rest of the
colors.
I have not found any examples on anything similar. Could you please point me towards how to achieve this?
Approaches I thought of:
Subclassing CMenu to my own SkinnedMenu, but it is not created by our code but by a GetMenu() call in a mainframe class deriving from CFrameWnd. The only thing I can find here is its method signature, defined in afxwin.h so then how could I make use my own subclassed menu?
Removing the entire menu and add my own custom menu buttons, in a row, making it look like a menu. Maybe this is what spotify have done, as they have also removed the Windows window frame.
Editing the existing CMenu in some way, but the only customization I am able to find right now is modifying its MENUINFO. For example if I set info.hbrBack = skin.GetSysColorBrush(COLOR_MENU) the only colour that changes is the background of the dropdown, not the main menu itself.
Other :)

how to get rid of visual tab focus

while running my qt application in linux, a tab focus appears on the selected
control- like this:
that doesn't happened in windows.
how can i get rid from this visual focus?
Try one of these:
Explicitly set the QApplication style to one that doesn't draw a focus rectangle on the tabs, for example plastique. This might break any custom style sheets. The native look and feel will be gone, too.
Set the QTabWidget or QTabBar focusPolicy property to NoFocus. The user won't be able to change between tabs using the keyboard.
Set the QTabWidget documentMode property to true.

Resources