Using Visual Studio 2010 C++ with MFC. The number of configurable settings in my application is slowly creeping up. I managed to design a settings class where adding a single line will add a setting to the program and support reading/writing that setting to my ini file. However, I still need to go into my gui editor and edit the options dialog box, moving text boxes around, aligning labels etc. which is kind of a pain.
How would I autogenerate my options dialog box such that I could give it a data structure and it could generate the option interface for me? It's okay if it's something like a list box. I'm thinking something like the the Visual Studio properties dialog box which has the look of something that's programmatically generated:
I'm just trying to get a conceptual overview of what controls would be best and how to piece it together. Of course if there is a link to a web page discussing this that would be great.
You want the CMFCPropertyGridCtrl class. It was introduced in one of the MFC updates, but I'm not sure whether or not they come pre-installed with Visual Studio 2010; you may need to install something extra.
Related
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.
I use
Visual Studio 2015
Can I change the "redmine" interface elements with "visual studio" or another system?
For example, for the "task creation form" I want to add "buttons" or additional "tab bar".
Can this be done by analogy with working with "Windows Form"?
I mean drag the button onto the form and add the code for the button.
PS
I start to study programming, I apologize if the question is inaccurate
To change Redmine UI, and add/remove new features, you would have to learn html/css, ruby, and Ruby on Rails framework.
Once you learn them, best way to modify Redmine is by making plugin which adds functionality you want, and preferably share that plugin with others via github and redmine's plugin registry listed here: www.redmine.org/plugins
In that sense, you can use Visual Studio, as code editor, or any other text editor, as long as they have nice syntax coloring, code indenting, and preferably function and variable name completion...
i work on a Windows CE 6.0 Image and added a Audio driver to my Solution (my solution is based on a image without audio). Sound works fine but i dont know how i can add the standard Windows CE 6.0 Sound Settings dialog to the control panel.
MSDN says the following:
"The Windows CE Control Panel allows users to set a variety of system-wide properties, such as mouse sensitivity, network setup, and the desktop color scheme. You can select specific functionality to include in your Control Panel by specifying them in your Cesysgen.bat file."
Can anyone explain how this works exactly via Cesysgen.bat? In my project i cant find any entry for cplmain in my Cesysgen.bat.
Could it be that those standard Applets are integrated into the control panel automatically? (maybe with "getProcAddress()" when a specific driver is loaded?) - This idea comes from "cplmain.def", there is written:
EXPORTS
CPlApplet
; These functions are exported for componentization
; We use GetProcAddress on ourselves to dynamically discover
; what components we have
I found a quite good explanation from Andrew Pearson here:
http://www.itlisting.org/4-windows-ce-embedded/a57eef4103191b7a.aspx
but i tried a few different things an nothing worked! So this confuses me even more. The only statement there i really understand now is:
The control panel, unfortunately, is about the single most confusing thing
to build in the whole tree.
Yes it is! Would be nice if anyone had an idea.
Kind regards,
Martin
I've created custom control panel applets before, and to be honest, trying to modify the existing applet is about the worst thing you can try. Generally what I do is just create a whole new applet, which is really just a DLL renamed to have a .cpl extension and that exports the CPlApplet entry point.
There's an example in MSDN that shows the expected values the OS will pass in to get your icon, tell you to start and those types of things.
Basically just build your own applet as a completely separate project, then include it in the MODULES section of your BIB file. Don't even mess with the existing train wreck of control panel code.
I have visual studio 2008, and want to build an GUI application that on the left side has a frame that can be minimized like the firefox bookmark sidebar. So my questions are: 1) What type of project do I need? 2) What controls actually make up the sidebar. 3) What do I make the main frame so that I can resize it when the sidebar is open. A example would also be cool.
Thanks in advance.
CP
It looks like a TaskPane (CTaskPane ) attached to a simple SDI frame window (taking into account firefox is doing a lot of things custom with their own toolkit (I think, and I've been known to be wrong)
Download the MFC VS2008 feature pack (with the new UI controls) and the feature pack samples and have a look at some of the sample projects (for example "TaskPane" and "VisualStudioDemo"
Though often maligned, as Max pointed out, MFC provides CTaskBar, which is designed for exactly this sort of thing. What you have inside it looks a lot like a CTreeCtrl (or CTreeeView) with an associated CImageList to display the icons for the bookmarks. Resizing the mainframe while the sidebar is open is handled automatically. To create a project that includes this, select the "Visual Studio" application type (after choosing "MFC Application").
Just as a note for the record, I'm reasonably certain that FireFox does not actually use an MFC CTaskBar. FireFox's sidebar is quite limited by comparison -- it only allows one sidebar with one pane in one position. CTaskBar supports multiple task bars, that the user can rearrange at will, each of which can have multiple tiled and/or tabbed panes (and, for example, the user can not only move a complete task bar by dragging, but also drag panes between task bars, drag a pane out on its own to become a separate task bar, etc.
Note that nearly all of this is handled internally by MFC -- you simply create window classes for storing and drawing data in the panes, and it handles things like keeping track of where a pane is at the moment.
well, you can always download the source for FF here and have a look for yourself, you might find more than you expect ;). another good tool to remember is spy++(in VS), very useful for finding properties of windows etc
Ive been looking a long time for this, but can't seem to find it. When I add a menu strip in vb .net, it looks like this:
http://img19.imageshack.us/img19/4341/menu1sbo.jpg http://img19.imageshack.us/img19/4341/menu1sbo.jpg
and I want it to look like the WinRar, Calculator, Notepad etc menus like this:
http://img8.imageshack.us/img8/307/menu1a.jpg http://img8.imageshack.us/img8/307/menu1a.jpg
From what I gathered, in vb 6 you could create a mainmenu and do it this way, but in vb .net it seems like all there is is ugly menustrip.
Thanks
You may have to get dirty and create a CustomRenderer(ToolStripProfessionalRenderer) to apply to the ToolStripManager
Without rehashing to much, this doc looks like a nice overview or you can always opt for the Microsoft tutorial
menustrip is derived from toolstrip
You may need to enable XP theme support in your project settings. To do this, go to My Project in your Solution Explorer, and make sure "Enable XP Visual Styles" is checked under the Windows application framework properties group down near the bottom of the Application tab.
If this doesn't work, you might need to create an application manifest as described in this MSDN article.
This question is quite old but for anyone else interested, you can find this type of menu in the .NET framework components. Just right click the Toolbox -> Choose items -> .NET Framework Components and filter for MainMenu. Works exactly like any other menu strip from what I've seen so far.