Is there visual representation in Visual Studio 2013 like in Netbeans? - c++

I want to ask if there is in Visual studio 2013 a visual representation of my application like in NetBeans where i can add thing like containers or controls ex. Button or checkbox?
I know that one is Java and one is C++ (in my case).

Depending on the type of project that you create, you will be presented with different options to populate the UI. If you create a xaml or winforms project, it will present a toolbox on the left hand sidebar. These elements can be dragged onto your form and events can be added via the properties window on the right hand sidebar.
It's pretty easy to use and master within an hour or so. Don't be afraid to whip up a small test project to sample the different elements available.
[EDIT] - Once you have completed the creation of the win32 project, you'll need to add a new windows form. You do this as so:
right click on the solution explorer root (possibly called Win32Project1)
click the add item on the popup window
choose new item
select the Visual c++ node->UI
choose the Windows Form item and add
Now you will see the form on screen. Next, navigate to View Toolbox (CTRL+W, X). Now choose you control (start off in the All windows forms section). From here drag the desired control onto the form and party on it :). Thereafter, it's just a matter of adding code to the events (or creating class objects and referencing them via the events)

Related

How to implement a simple add-in for MS Excel on C++

I need a help for implementing add-in for Excel 2010 or higher on C++, the only functionality of this add-in is renaming of current Excel sheet.
The add-in should create new custom tab on the Ribbon with name: “Test Add-in”, this tab contains group with name “My Functionality”, this group contains large button with some picture with name “Rename Current Sheet”. After clicking on the button, I should show the following dialog:
User can enter new name, click ok and after this, the name of current sheet will be changed.
I understand that I need to use #import directive for getting references to Office API, use ATL to wrap COM objects, MFC or WTL to create dialog, but I I'm not opposed to using the mentioned methodologies.

wizard (or an alternative) in an aui managed pane

I would like to have wizard in my application. but I don't want the focus to be on the wizard until the wizard is finished. That's what happens if I use wx.wizard. I prefer to load the wizard in an aui pane. So the user can switch to main window even in the middle of the wizard. I can have panels on top of each to make a wizard. Kindly point me if there is a better Pythonic way of doing that.
Thank you in advance.
The Wizard "widget" in wxPython is basically a dialog. I don't think you can embed it in your application. You might be able to extend the widget somehow to do so, but that would likely be a lot of work.
Instead, I would just create a set of panels that are your wizard pages. You will need a main panel that has some buttons on it that you place your pages on. Then when you hit the button, it will show the next page. I wrote a tutorial on the subject a couple years ago that should get you started:
http://www.blog.pythonlibrary.org/2012/07/12/wxpython-how-to-create-a-generic-wizard/

How to modify captions of windows created by visual studio project wizard

I have craeted a Visual C++ project using studio 2010 wizard in which I have added things like FileView, ClassView, PropertiesWindow, OutputWindow etc, with the help of wizard. Now I am interested in changing the default captions/names of one of these items let's say FileView. The FileView has a resource string "IDS_FILE_VIEW" associated with it with value "File View" which is displayed as a caption of the FileView window. If I change the value of above mentioned string in the resources it does not change that caption and still shows "File View" as a caption. Could anyone suggest me that how can I customize captions and other features of such common windows created through studio wizards?
Thanks a lot.
You don't say, but I assume from the "IDS" that you are using the MFC libraries.
In MFC, the resource strings like IDS_FILE_VIEW are defined and used by the designer but it is quite possible to override them. Changing the IDS_FILE_VIEW resource's value will indeed change what is displayed when that resource is used, but you may have (inadvertently) prevented that resource being used where you expect.
I would check through your project files to see where this and related names appear and verify that there are no inconsistencies.
HtH
Ruth

MFC: How to create options dialog with listbox and multiple pages?

Developing using Visual Studio 2010 C++ and MFC. I want to create an options (preferences/settings) dialog box that can display several options. After considering many different options dialog box UIs I think I like the listbox-with-multiple-pages-style similar to visual studio's option dialog box (but I don't need the treeview, a list box is fine).
What's a good way to implement this? Do I use a CListBox and then handle the selection event to load up the individual pages? I'm new to MFC, what would the individual pages even be? Something like a panel? Ideally I would design them in the resource editor and then be able to load them up.
Take a look at http://www.codeproject.com/KB/dialog/embedded_dialog.aspx for one possible way of doing this.
The individual property pages can be designed as dialogs in the resource editor, and then the relevant page can be displayed in your main dialog depending on the selection in the list box, by handling the LVN_ITEMCHANGED message.
See CPropertySheet and CPropertyPage classes. This allows you to easily manage a properties window with several views.

How can I visually design a component in C++ Builder?

I have been away from C++ for a couple of years now doing AS3/Flex work. I have gotten used to being able to create a component and place it in design mode with very little fuss and I am struggling to get my head around the C++ Builder way of doing the same thing.
I have written many components for C++ Builder in the past, but none of them have been visual. What I would like to do now is create a component for customer search and another for order processing because I want to be able to create a new instance of these on the fly. What I don't want to do is have to place each of the components like the dbgrid and search fields manually in code. I would like to do this (as well as set their properties) in design mode.
How do I go about this? I have browsed the source for other Delphi components and I notice they have dfm files which seems to be what I need. How do I do this in C++ Builder? The only option I see is to add a new form if I want a dfm, but this isn't what I want as my components will be based on TPanel.
Is there a way to do this or do I have to resort to doing it all in code with no visual reference?
Pursuing the DFM idea I did a test this morning where I created a component based on TPanel and added a new form to it which I create and parent in the constructor of the component. In design mode I set the form border to none and placed a grid on it. This all looks OK until I place the component in my application, at that point it looks like a panel with a standard looking form in it and the grid is missing. If I run the app the panel shows as expected, borderless and with a grid. The DFM appears to be ignored in design mode for some reason.
If you know a better way to do this than using components then please give me some pointers.
Any help and advice will be appreciated beyond words
You might want to have a look at frames (look for "Frame objects"). They are "subforms" you can design visually and then place on forms.
Just as an FYI item, you can also drop the panel on a form, put any other controls on it, position them, set captions, etc..
Now, click the panel to select it, and use Component->Create Component Template from the IDE's main menu. This creates a unit you can install as a component which will add the panel and it's sub-controls (as a single component) to the IDE's component palette.
Of course, you can then modify the source for that new component like any other component source.