How do you programmatically close dialog boxes?
Posted on 1997-04-02
How do you close programmatically all the dialog boxes? Using
ShellExecute I print a file, e.g. "c:\temp\test.xls". If this is not a
valid Excel file, Excel will bring up a dialog box complaining about
this. How can I programmatically control this? Is there a way I could
either close the window or force these dialog boxes to go to a "garbage
window" by specifying a window in the first argument of ShellExecute?
If I don't do this my program hangs next time I try to print another
Any help would be most appreciated!
P.S. By the way, what is the purpose of the default directory argument
in ShellExecute and FindExecutable?