Author Topic: Howto include own Dialog (wxSmith)  (Read 9141 times)

Offline dirk_1980

  • Multiple posting newcomer
  • *
  • Posts: 25
Howto include own Dialog (wxSmith)
« on: July 29, 2013, 11:39:59 am »
Hi.

I Build a new Dialog, as a standalone project.
Because i need this Dialog inside many other projects, like a WxFileDialog.
So far so good.

Now i will use this Dialog inside a new Project (MainProgram).
But how can i import / use this Dialog?

I can add all my files, but the *.wxs file is not working.

What can i do, or is this the normal way just to include the cpp & h and have no access to the Dialogform?  

Dirk





Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Howto include own Dialog (wxSmith)
« Reply #1 on: July 29, 2013, 05:39:24 pm »
sadly at the moment i don't think it is possible to import a dialog easily.
I have done this by manually adding it in the .cbp file....
look how the dialog is stored in a cbp file and c & p it to the other project....
if you are using  an xrc file i think there exists a import function (but I'm not sure)

greetings

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Howto include own Dialog (wxSmith)
« Reply #2 on: July 29, 2013, 06:31:02 pm »
What about creating a library and link it to the main-app(s) ?

Offline dirk_1980

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: Howto include own Dialog (wxSmith)
« Reply #3 on: July 29, 2013, 10:26:41 pm »
Sad, no easy import.

So i have the choice:
A: copy my Code into my new Project and import the CPP & h Files
B: build a lib and include the Lib header & link the lib to my project

Copy the Code is easy and i can change the code if i need.

If i use a lib and will change something, i have to change my lib, not really nice.

I have never build a lib!
But i will try it, because i can put some more code inside.
Can You help me, just a few words.