Do you want to add code that will run when your new Dialog or Frame is launched, or code that will launch the new window?
If you mean the first, you can add your code in the constructor of the class.
Just be carefull not to add any code between
//(*Initialize(xxxDialog)
and
because that is the part that is managed by wxSmith.