View Full Version : Custom Dialogs 'X' - Not Working

07-11-2008, 11:31 AM
Hey there,

I've created several custom dialogs and I noticed the 'X' on the top right is not doing anything when clicked.

I stumbled over this thread and added the code in the switch block but it doesn't work.


Any suggestions?


07-11-2008, 02:50 PM
Is this an InstallScript or InstallScript MSI project? Does this dialog code also encounter this issue in a sample project? Can you post the dialog code here or send it to me at joshs@acresso.com?

07-14-2008, 02:14 PM
This is an InstallScript MSI Project.

This is not an issue when working with Standard Dialogs, only my custom ones. I added the code in the link that I found, but did not help.

07-14-2008, 02:22 PM
Do your custom dialogs have a pushbutton control with "C" as the text and a control ID of 2? If not, can you try adding a pushbutton on the dialog that uses the following settings:
Control Identifier: 2
Text: C
Visible: False

With this and the code added to the default switch case in the dialog code, test the close button again.

Please let me know if this helps.

07-15-2008, 12:27 AM
Also, note that there is a complete custom dialog example provided in the dialog sampler, which source is shipped with the product. This source can be used as a working sample for comparison.

Checking this source, make sure that you have a handler for IDCANCEL (e.g.)

// Escape or System menu - Close
bDone = TRUE;
bExit = TRUE;

Also, as Josh S. indicated in a previous post you may need to add a special invisible control to make this work.

Devin Ellingson
Software Developer
Acresso Software