Different size of dialogs in VS 2010 - visual-studio-2010

I have two dialogs in my MFC application, I want its to be the same size and I resize them in design view but he dialog's size shown in the status bar is different.
Dialogs has same properties.
How it could be?

The problem was in different font used in dialogs.
Still not understand why font affect on dialog's measurement units.

Related

How to properly use sizing with Cocoa

ALL,
NSSmallControlSize page has following explanation:
This constant is for controls that cannot be resized in one direction,
such as push buttons, radio buttons, checkboxes, sliders, scroll bars,
pop-up buttons, tabs, and progress indicators. You should use a small
system font with a small control.
Is there any way to set the size for other controls? Namely NSComboBox.
Unfortunately the documentation is not talking about that. It's not even mentioning if it is at all possible.
TIA!
As the page describes, the constant is for controls that cannot be resized in one direction. Combo boxes, like the listed controls, cannot be resized vertically. Therefore it makes sense that the constant would apply to combo boxes.
This can be quickly verified by creating a combo box in Interface Builder, clicking on the Size inspector, and setting its size to Small. Since this works, we can conclude that the small size is compatible with combo boxes.

How to perfectly mimic toolbar buttons as in Finder, Safari, or other default apps?

I'm trying to create an application that would be as standard as possible in terms of style.
An image is worth a thousand words: I can't figure out how to make my buttons the same size as in Apple's programs such as Safari or Finder.
As you can see, the sizing I've set in interface builder don't seem to match the size the buttons get when I run the app, but maybe that part doesn't speak in pixels but in points or something? Also, textured rounded button has only width editable, but not height.
In this case, these are NSButtons, but I guess I'll have a similar problem with other control types...
I found it out! The problem was with neither of these two parts outlined in the screenshot, but in the "Toolbar" item, higher in the hierarchy.
There is a Size attribute in the Attributes inspector which defaults to Small, but you can set it to Regular instead, and then the buttons get the same sizing as in Finder and all.

TortoiseGitMerge customization

Is there any way to make TortoiseGitMerge highlighted section be same as in TortoiseMerge without resizing window?
Ribbon bars are not customizable by design.
It depends on the window size whether the up and down arrows are displayed as big or small icons.

MFC grid is absolute layout and gets clipped during window resize

Using visual studio C++ 2010.
Currently in a window in MFC code I have a grid. I want the grid to "become smaller" if I resize the window (drag the corners manually), but as I resize the window the grid actually is completely static, so e.g. resizing the window to a very small size will cause the edges of the grid to become outside of the window's visibility.
I noticed that the other "objects" within this window (notably, the MFC buttons I have such as "cancel") do scale with the window and don't go out of sight when I resize the window to a smaller size. They follow the window's edges as if they were given smart relative coordinates instead of absolute coordinates that my grid follows.
Currently I am using the grid here http://www.codeproject.com/Articles/8/MFC-Grid-control-2-27 although I highly suspect it is not the source of the problem (there is an example code that uses it, and the resize behaves as expected; I cannot compile it but I ran the exe example). I recently switched from MSFlexGrid (because it doesn't support 64 bit) but in the previous version when I used to use MSFlexGrid, it didn't have this problem either.
I thought it might be some sort of window property or object property in the .rc file but I compared the files and found no leads.
There is no such a thing like a window property that tells window to adjust the size to the size of the parent.
If buttons change size and position, you are probably using some kind of class that takes care of resizing of the child controls.
Follow the same for your grid, or notify grid about the parent size change and adjuxt grid size accordingly.

What Qt4 widgets should I use and how to approximate a ribbon-style interface?

I am trying to create an interface for my application using Qt Designer. I want it to have a tabbed, ribbon-style set of controls at the top, and a MDI-style area with docked windows which I plan to show and hide depending on which tab of the ribbon is currently selected. I am just beginning with Qt Designer as well as Qt4 itself for that matter so I'm not quite sure how to setup the window, which widgets and layouts should I use etc.
It's quite obvious there should be a QTabWidget at the top, but I'm not sure about the bottom. Should I use a QFrame? A QMdiArea? A dock widget? What layouts can I use to make sure the tab widget has a fixed height, occupies the whole width of the window at all times and the bottom area scales as the window is resized?
I've read in the manual that splitter layouts allow for manual adjustment of the size of the widgets they contain, but I can't drag the box size of a widget after I place them inside a splitter. Thus I'm unable to setup the area below the ribbon. Anyone, help?
You should look into the QMainWindow and check the multiple utilities it can provide you (Toolbar, StatusBar, DockWidgets, CentralWidget, etc...).
The way I understood your case is that you will always have the MDI Area visible, and that the tab bar will only be used to change the dockWidgets. Here's how I would do it.
The centralWidget of the mainWindow would be a QWidget with a QVBoxLayout containing a QTabBar widget first (up) and a QMdiArea under it. The sizes should be handled automatically.
This will allow the user (or you) to dock widgets on the left, bottom, top or right areas of the mainWindow's central widget. Keep pointers to the dockWidgets to be able to move and show/hide them at will.
Hope this helps.
VTK Designer, which is built on Qt, has a Ribbon-ish interface. You might take a look at the source code for reference.

Resources