Taking a look at your code, you declare the dialog as non-modal using CSRDialog::DoDialog and setting the first parameter to false, but in your function that shows the dialog, you create and delete the object just after.
The right code should be:
void CSearchScenario::LaunchDialog(char * title)
{
if(CUDialogSearchRefCon::m_dialog!=NULL) // static member, the best should be a CUDialogSearchRefcon::GetInstance
// that creates the object if not already created
{
CUDialogSearchRefCon::m_dialog = new CUDialogSearchRefCon(this);
if(CUDialogSearchRefCon::m_dialog)
DialogSearchInstrument->DoDialog(false, title); // concerning the return, at your convenience..
}
else
CUDialogSearchRefCon::m_dialog->Show();
}
and you must overload the destructor of CUDialogSearchRefCon in order to set to null the static member m_dialog that you have to create:
CUDialogSearchRefCon::~CUDialogSearchRefCon() // declare it as virtual in the declaration of the class
{
CUDialogSearchRefCon::m_dialog = NULL;
}
This is at least the main error I saw. Otherwise, for the identifer of the dialog, you should be careful: don't use identifiers that are already used by Sophis (for instance not in the 2000 range, best in the 6000). And ask the other developers who develop other toolkits: no dll, if loaded in the same process, should use the same identifier for a dialog.
Rgds,
Philippe