Problem with WS_EX_APPWINDOW and ShowMessage()


2004-11-25 07:55:54 PM
cppbuilder6
Hello,
I'm using this code to set a form as minimizable in task bar:
void __fastcall TFormScan::CreateParams(TCreateParams &Params)
{
TForm::CreateParams(Params);
Params.ExStyle |= WS_EX_APPWINDOW;
Params.WndParent = GetDesktopWindow();
}
It works fine.
However, when I'm calling an Application->ShowMessage() or even
Application->MessageBox() from this form, the message dialog opens on top of
application's main form instead of the right form.
The worst is, when I click the new form's task bar icon, it shows above the
message dialog, thus locking the application.
Is there a way to force the calling form as parent of
ShowMessage/MessageBox?
Thanks
Gil