Detail Grid in MFC - c++

I want a detail grid kind of control in MFC, where on expanding each row of the grid an embedded dialog would appear for it (not a popup but inside the same parent control, inside which I can show other controls).
Can you please point me if there is any such existing library providing this kind of a control? Or else how to go about implementing it. I want to do it in C/C++, MFC, Win32.
Best,
Sourabh

You can try Codejock Xtreme Toolkit Pro (Link). I had the opportunity to use its Grid Control to create an excel like sheet in MFC. It was quite good for my needs.
Refer to this link, i think it has what you are looking for.
HTH

Related

Table/Grid using MFC

I just started developing an MFC application for the first time and I'm hoping to get more familiar with the whole "controls" concept. I am using the dialog editor in visual studio and so far I was not able to find functionality to add a simple table/grid. It seems quite basic to me, but I can't even find reliable information on how to do it on the internet.
I am looking for something similar to Qt's QTableWidget, something that I can later program with variable amount of rows and columns tailored to my application's use cases.
Do you have any ideas how to do it?
I use CGridCtrl which is very powerful and does a lot of the legwork for you.
Sounds like you're after a List View Control, which is wrapped by MFC's CListCtrl class. The dialog editor will enable you to add one and set its properties.

StackPanel in MFC

I was frustrated because I know StackPanel wasn't in the MFC.
I'm making a UI, and I have to stack the controls vertically.
If i'm using WPF, I can use StackPanel, but I'd like to ask you some advice on how to do it in MFC.
thnk you very much
There is nothing in MFC that implements the functionality of a StackPanel. If you want to stack controls, you're going to have to do it yourself, either in code or the resource editor.
Starting with Visual Studio 2015, MFC was updated to include support for Dynamic Layout. That helps automatically re-arrange controls when a dialog is resized, but still doesn't get you the entire functionality of a StackPanel.
With MFC you have to do this manually or find third-party code that does it for you. E. g. have a look on CodeProject.
To do layouting on your own, you have to know how much space each control requires to show its content unclipped.
Some controls have methods to calculate their "ideal" size, e. g.:
CButton::GetIdealSize()
CRichEditCtrl::RequestResize(), Calculating a Rich Edit Control Minimum Size
Some controls like CStatic don't provide such methods. In such cases you may succeed to calculate their size using CDC::DrawText() with flag DT_CALCSIZE (don't forget to select the font of the control into the device context first to get accurate measurements).
In other cases, where such calculations are not possible, you may assume a fixed size for a control.

Implementing an extra title bar button

I am developing a C++ Desktop application, and wondered what exactly I would need to do in order to add a button into the title bar of my application, and how to do it. I'm not really sure how to go about doing this.
I'm aiming to achieve something like the titlebar of the Windows File Explorer
or something like this
Any help would be appreciated!
First one requires Ribbon framework, there is also MFC and some third-party variants.
Second is some sort of Custom window frame implementation.

How to use an autocomplete edit control in an MFC Ribbon Application

I need to develop a search module for an mfc ribbon application using C++. I have used auto complete feature in C#.NET but never worked on any mfc ribbon application. I want auto complete search with an icon image as prefix of each suggestion, just like Facebook search. I have also consulted this article, but that uses CComboBox, I need to use CMFCRibbonCombobox in my program because I tried with CCombobox but that was causing problems. Any help will be appreciated.
you need to create your own CMFCRibbonComboBox derived class, that will be pretty much a copy of the CMFCRibbonFontCombBox without the fonts.to check how you draw the images you can check the CMFCRibbonFontComboBox::OnDrawDropListItem implementation.
Then I think that you will have to dynamicaly add it to the ribbon.

Is it possible to edit data in place using CListCtrl - if not, can anyone suggest an alternative control in MFC?

I'm designing a MFC app in which I'd like to have a grid with 2 coloumns : both editable in which the user will input data and the app will get notified about it. The number of rows can be increased/decreased by the user as he wants - What would be the ideal MFC control to use for this kind of requirement ?
This is my first time designing a MFC app , so dont mind if it sounds too noobish :)
It's not a noobish question. Actually you have encountered a problem which bugs every MFC developer since 15 years: The MFC library does not have a built-in Grid Control. And a kind of Grid Control is what you are looking for, I guess. As far as I'm aware of, it is not possible to edit two columns in a CListCtrl. Only the first column, the "Label", can be edited.
For a Grid control you have to look for appropriate Third-Party tools which can be added to your projects, for instance as ActiveX controls. (I remember that the old Visual Studio 6 came with an "MS FlexGrid" which you could add with the component gallery to the project, but I've never worked with it, so I don't know if it's a good choice. But perhaps enough for your purpose.) Most third-party Grid controls require license fees but here is one (quite powerful) grid for free (at least free of fees but not of a license):
http://www.codeproject.com/KB/miscctrl/gridctrl.aspx
(or google by "MFC Grid Control" or something like that. I think there will be more free grids.)