How to keep seperate VisualStudio window on same/next z-level as main window? - visual-studio-2017

I use VisualStudioCommunity 2017 15.4.1 and opened an extra editor window. I click on the VisualStudio main window to bring it to the front.
I would expect the extra window to also come to front. However, the extra VisualStudio window still hides behind another application (e.g. my browser window). I have to manually bring it to the front.
=>How can I tell VisualStudio to keep the z-order of its windows next to each other to be able to bring all of its windows to the front with only one click?

You can enable the Floating tab wells always stay on top of the main window option to make extra editors activate and hide as the main window:

Related

How to find slide show window of Microsoft Power Point

I have a simple c++ wIn32 program that allows you to paint over windows in Windows OS.
This program has a UI that lets a user to choose windows he wants to paint over.
The problem I'm facing is that if a user chooses a specific Microsoft PowerPoint window and than starts a slide show (by pressing 'F5' for example) than another new window is opened on full sceen and my program is unaware of it and does not paint over it.
I need to find out how may I identify this new window, assuming I can perform periodic polling on existing windows using EnumWindows method.
I have tryied using the methods GetAncestor & GetParent on the Slide Show window and on the PowerPoint window to see if they match but both of them return different HWND handle.
Moreover, a solution of identifying that a specific HWND handle is a PowerPoint Slide show window is not sufficient since if I have for example 2 instances of 2 different Power Point windows and the user has chosen to paint only over one of them, than I want to make sure that only if the chosen PowerPoint window is going to slide show window than I will paint over it. If the slide show window was started from the non-chosen PowerPoint window than I don't want to paint over it.

can't change mfc controls order

I have a dialog box with a list box,slider and a button.
I tried to change the background color but I couldn't managed to change that, so i thought that if I add a "picture control" as a bitmap and put it in the background i will succed, but now the problem is that the "picture control" is on top of all the controls.
I tried to change the the tab control with Ctrl+d but it didn't change anything.
I also tried to use SetWindowPos to top or buttom but also it didn't change anything.
I noticed that if I click in the location of the button it's brought to the front as I want.
Is there any way to "click" all the controls at the begining? do i miss something in order to bring the control to the top?
If you need to change the background colour of the dialog box, you need to handle the WM_CTLCOLORDLG message and return the handle to a brush (if the brush is not a stock object, make sure you delete the brush after the dialog box is closed) -- or, you can process the WM_ERASEBKGND message and erase the background yourself.
I tried to change the the tab control with Ctrl+D but it didn't change anything. I also tried to use SetWindowPos to top or buttom but also it didn't change anything.
Ctrl+D does get you in reordering mode, however there is a more reliable way of checking. The dialog template is in text form in .RC file, where you can review the order of control with text editor and sort lines manually the way you wish. This will be the order of control creation and tab order as well. Sometimes it's even easier to reorder controls this way.
More to that, when your application is running, Spy++ SDK tool can enumerate windows and again it will give you window order for checking.
SetWindowPos with proper arguments changes Z-order of controls on runtime as well.

C++ WinAPI - How to make button appear pressed?

I have in my editor few editing modes. I can choose specific mode using buttons that are placed on a toolbar. I want to indicate which mode is currently on. When I press appropriate button - I want to make the clicked button remain pushed. How do I do that in WinAPI? My toolbar uses bitmaps for icons if that's relevant.
There used to be a way to get something like the look and feel of a toolbar by using a normal check box with the BS_PUSHLIKE style set. But that got broken a bit with Windows XP because of mouse hover effects, so it's not widely used any more.
If you want to create your own toolbar, without the help of MFC, there is an MSDN article that covers the creation and management of a toolbar window (actually a dedicated window class as part of the Common Controls Library).

Moving layered windows concurrently in win32

i am trying to implement a custom tab control in my win32 window, for that i have used a layered window which is child of the main app window (for the main tab control) and independent windows for individual tab items.
My problem: Whenever i move the main app window, the control window moves along with it (because its the child window) where as the individual tab item windows remain on their position. Can anyone guide me how to to get the tab items windows move along with the main app window concurrently? I can not set the item windows as child of the app, so please base your suggestions on that.
You should redesign your tab to be a child window. Otherwise your attempts to make it work is nothing but a desperate try to fix the thing made bad in first place.
Still if you feel like sticking the original plan, you need to hook/subclass the main app window and handle its movement and sizing messages (WM_MOVING and friends) so that your handler could update your popup/tab window position respectively.

Needed: A popup window without a taskbar icon

I am designing a UI engine that needs to render into popup (WS_POPUP) windows. As these windows cannot be children of other windows, each instance is given its own taskbar icon.
I need a way to prevent the taskbar icons from appearing for certain windows that are created as "dialogs". I cannot use an OS-provided dialog because they all have frames (and I can't figure out how to render into them) or a tool-created custom dialog (which seem to require the CLR).
I am not an expert with the windows API and I feel that I have missed something obvious...
Also: Anything involving CLI/CLR is not an option.
EDIT:
The WS_EX_NOACTIVATE style can be used for this purpose as well, though the activation behavior would need to be emulated by the program.
If you set the WS_EX_TOOLWINDOW extended style for your window, it won't be shown in the task bar or Alt+Tab list. This does cause the window to be rendered slightly differently, however (thinking floating tool palette).