question

agouradude-2035 avatar image
0 Votes"
agouradude-2035 asked agouradude-2035 edited

Make Visual C++ Boilerplate Framework a little more useful?

I am not a full time programmer, but I've been using MFC in multiple Visual Studio versions for some years while I've been writing the code to make my own tools that I needed to use mostly for my work.

Every time it took little effort, but it worked out gracefully with MFC. Most of the times, I've been using MDI rather than SDI, and I also wrote a couple programs in the dialog based structure as well. These tools helped me a lot and also made my co-workers happy as well.

I don't remember exactly when, but I noticed that Microsoft included the nice looking boilerplate framework which has the CFileView, CClassView, COutputWnd, and CPropertiesWnd classes. It definitely looks nicer and seems to complete the program in a better way. I was hoping to use these additions in my programs as well, but it required a lot more than what I could easily achieve.

My simple user model would be to list up the file names(Titles) interactively in the TreeView instead of having the "Fakexxxx.h" or "Fakexxxx.cpp".

I tried multiple google searches for the answer, but my search was not very successful so far. If someone could give a nice answer on this, that would be fantastic. I would like to provide one example program, HelloWorld, where TreeView shows the file name(s) once the files are open, and it also disappears when the file is closed.

Expected behaviors are ...
1. Add the filename or the title in the TreeView when the new file is open.(implemented in the example code)
2. Remove the item when the file/view/doc is closed.(implemented in the example code)
3. Browse to the corresponding view when the item in the TreeView is selected by LButton double click.
4. Remove the item and the corresponding view/doc when "Remove" is selected from the context menu in the TreeView.

Again, I am not a full time programmer, thus this program is not necessarily for the code example, but to give user model ideas. Please open up the program and try it yourself. I also added the 3 example files for you to try as well.

Visual Studio 2015 is used for this example, but I am pretty sure you would be able to compile the program under different Visual Studio versions.


Hmmm.. Bummer. I can't attach the zip file here. I tried to trick it by changing the file extension to txt, log, and pdf, but it didn't work out. I am just attaching the screenshot, but I would really like to share the code example with fellow programmer for some ideas. :) 79996-default-framework.png


81266-new-framework.png


c++dotnet-runtime-framework
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I sure do not know what the question is.

0 Votes 0 ·

That's very unfortunate.

0 Votes 0 ·

@agouradude-2035

According to your description, If you want to display only the file name in the File View, not the corresponding .cpp and .h? And What do you mean by Visual C++ Boilerplate Framework? Could you please describe your problem in more detail?

0 Votes 0 ·

Boilerplate Framework was about the default GUI display in the MDI program. I've made another snapshot. If you open up two snapshots together and compare, I am pretty sure you will have a better idea.

As shown in the snapshot, let's say you open multiple files in the MDI program, I would like to switch over to the particular view when the filename or title in the TreeView is selected. In the current framework, it's just showing same dummy filenames from the auto generated code, but I hope Microsoft could update the default code and improve the stock user interface.

Expected behaviors are
1. Add the filename or the title in the TreeView when the new file is open.
2. Remove the item when the file/view/doc is closed.
3. Browse to the corresponding view when the item in the TreeView is selected by LButton double click.
4. Remove the item and the corresponding view/doc when "Remove" is selected from the context menu in the TreeView.


0 Votes 0 ·

@agouradude-2035

Could you please share the example directly to OneDrive? And please don't include any private info in the demo.

0 Votes 0 ·
Show more comments

0 Answers