Visual Studio C++/MFC: how to prevent menu at top of CDialog from wrapping (or get the screen size of the menu) - c++

In Visual Studio C++ (2017) I have a resizable dialog with a menu at the top. If the user makes the dialog smaller, eventually the top menu wraps around. I need to either:
prevent the menu wrapping around (presumably so some menu items are missing)
or calculate the screen size of the menu so that I can calculate the positions of things in the rest of the dialog
Any ideas how I can do one or both of these?

Related

Replace Windows SDI Frame with Dialog Box VS 2019 C++

I want to either put a dialog box as a replacement for a SDI Windows frame, or put dialog type controls in the Windows Frame. I don't want a pop up dialog to show up. I would use a dialog based application if I could place a menu and toolbar on the top. They don't seem to be available.

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

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:

Tab Corrupted in Win32 (C++)

My application (C++, Visual Studio 2015) incorporates tab control. In most cases it behaves well.
Rarely, changing a tab results in corrupted interface.
Example:
Tab 1:
Tab 2:
Sometimes, when moving from Tab 1 to Tab 2 I get:
The arrow points on the problem area.
My code is very simple:
All tabs are implemented as dialog boxes
When the user click on a tab, all dialog boxes are hidden (ShowWindow)
Then the selected tad shows its dialog box.
This is cause by group box, it's background is not erased. Remove WS_CLIPCHILDREN flag from the parent of group box (child dialog or child window which owns the group box). Or subclass the group box control to paint its background.

Create borders around controls in MFC Form

I have an MFC form, basic stuff, a few group boxes, a few text boxes, some buttons, and a list box. What I'd like to do is add a border around all of it, preferably without a group box. Like, drawing lines along the right areas. I was told this is bad to do on a dialog though. What would I need to go about doing something like that?
I am currently using MFC C++ with Visual Studio 2008.
The easiest way is to add a Picture control to the dialog and set the style to have a border only. If the control has a width or height of 0 you can get a single line. Doing it in the dialog editor will only give you positioning down to the dialog unit, if you need pixel level control you'll have to create or reposition it in OnInitDialog.

Make thinner border for checkbox in winapi, WTL

I have the following checkbox, in visual studio I have set it's flat property to TRUE, I want to make it's rectangle border thinner. How could I do that in windows api, WTL, ATL ? C++. Is there some sort of message that I can send to the dialog in order to do this?
You can choose between control styles, e.g. flat vs. non-flat, and you can use owner drawn controls (buttons) to take over visual presentation of the control. There is no dedicated message to adjust the thickness of the box.