Help using wxFB with VS2015 Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
matthewflagg
Earned a small fee
Earned a small fee
Posts: 17
Joined: Mon Jul 10, 2017 3:23 pm

Help using wxFB with VS2015

Post by matthewflagg »

How do you use wxFormBuilder with VS2015?

So from my understand you can import your files from wxFB right into your VS2015 project file, and somehow inherit or inter-grade the files produced with wxFB and work it into your VS2015 Project. Now I've looked all over and this is all I've came up with, can someone show me how to inter-grade the tools together and is there any tips and tricks to make this easier.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4183
Joined: Sun Jan 03, 2010 5:45 pm

Re: Help using wxFB with VS2015

Post by PB »

As I wrote before. There is no integration between wxFB and MSVS. You need to add generated source files to the project by hand.

As for tips and tricks. I add the wxFB project to the MSVS project so I can easily open it from MSVS. I never modify files created by wxFB's Generate Code. I let wxFB to Generate Inherited Class (see the Tools menu) and do all the actual coding there.
matthewflagg
Earned a small fee
Earned a small fee
Posts: 17
Joined: Mon Jul 10, 2017 3:23 pm

Re: Help using wxFB with VS2015

Post by matthewflagg »

As I wrote before. There is no integration between wxFB and MSVS. You need to add generated source files to the project by hand.
I understand this, I just wan't sure if there was a certain way to do this.
I let wxFB to Generate Inherited Class (see the Tools menu) and do all the actual coding there.
So I see the Generate Inherited Class but when I click on it I get the follow Warning:
"You must set the "file" property of the project before generating inherited classes"
I know where this is but its just a blank text box after click on the "...", what do I need to put in here?

Thanks for your help,
Matthew
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4183
Joined: Sun Jan 03, 2010 5:45 pm

Re: Help using wxFB with VS2015

Post by PB »

matthewflagg wrote:So I see the Generate Inherited Class but when I click on it I get the follow Warning:
"You must set the "file" property of the project before generating inherited classes"
I know where this is but its just a blank text box after click on the "...", what do I need to put in here?
Whatever name you want to have the file with generated "write-only" UI code to have. For example, if you put ui there, wxFB will generate ui.h and ui.cpp files via File/Generate Code. If you follow what I wrote in my previous post, you just add these to your MSVS project and will not modify them. The files contain the code for all the UI items (frames, dialogs, menus, etc.) in the wxFB file. Whenever you make any changes in the wxFB file, you need to regenerate those.

You still need to Tools/Generate Inherited Class to produce the files you will add to the MSVS project and where you will actually write the code. Here you can generate the classes individually and therefore can have a file per class, if you wish so. E.g. you have MainFrame and SettingsDialog in wxFB project. wxFB will generate code for MainFrame and SettingsDialog into ui.h and ui.cpp (via File/Generate Code). You can generate the inherited classes via Tools/Generate Inherited Class, where in the dialog you need to create a Class Name for each derived class (e.g. MyMainFrame and MySettingsDialog) and set File Name for it, e.g. MyMainFrame (which will produce MyMainFrame.h and MyMainFrame.cpp). This you will do only once as the files would get overwritten when generating them again from wxFB.

I recommend experimenting a bit with wxFB, it is not difficult to use.
matthewflagg
Earned a small fee
Earned a small fee
Posts: 17
Joined: Mon Jul 10, 2017 3:23 pm

Re: Help using wxFB with VS2015

Post by matthewflagg »

I got it to work! Thankyou! :D
Post Reply