Is there a way to get the Title of the Dialog after is was created?
I want to use this to do some if-selections with the title.
if(title == "create") do this
if(title == "edit") do that
Well, this does not sound as a good idea to me at all, but if you insist, you can use GetTitle method (just beware, it returns WString - you can convert back to String by calling ToString - dlg.GetTitle().ToString()).
The correct solution would be either to use virtual methods, or some int member variable with enum (depends on situation).
mr_ped Messages: 815 Registered: November 2005 Location: Czech Republic - Praha
I case you go for quick hack I would rather test the pointer of object with &createDlg memory address, than title strings.
But where do you need these tests? Maybe you can avoid this completely (even with same class for both dialogs, or with very simple two wrapper classes derived from original class with just few functions overloaded).
Usually every time you finish writing some code, you can immediately write "second" version which will be much better.