PDA

View Full Version : Message Box wouldn¡¯t be an active window in a custom dialog



qiaoli
07-30-2002, 05:33 PM
Following is my test function:

function MyFunction(hMSI)
begin
MessageBox("Error! Please input data again. ",SEVERE);
end;

I created a CA and added the DoAction event in the NEXT button of a build-in dialog. When I click the NEXT button, the Message box was active window and popped-up in front of the build-in dialog. If I did the same in a custom dialog, the message box was behind of all windows(the custom dialog was still the active window). I have to click the icon in status bar to active the message box.

Did I miss some setting in the custom dialog? Or is it a bug in IS Developer?

Thankx for advice. Sorry for my bad English.

qiaoli
08-26-2002, 06:42 PM
Any one met this problem?
I reported it to InstallShield. The answer is “I have reproduced the reported behavior at my end. I'm forwarding this observation to the concerned person(s).” Is it a bug?

I just found an idea to avoid this problem. Instead of creating a new dialog, I copied a build-in dialog to my project. Deleted all existing controls and added the new control on it. It worked. But I have to redraw all custom dialogs. Any other idea?

Thankx for advice.

Simon Dand
08-26-2002, 07:50 PM
I see the same behaviour when using the SdShowMsg dialog from a custom action.

There are other threads on this forum stating that other developers have had the same problem with SdShowMsg focus.
The most documented fix is apparently to change the Window Style of the dialog to modal, but I don’t know how you do that with a Basic MSI project.

I assume the focus problem with SdShowMsg is the same as you are seeing with the MessageBox dialog.

Regards
Simon