Rich Cooper wrote:
> Rob Kennedy wrote
>> And do not use 2 for the window-handle parameter. Use the handle to the
>> window that you want to be the parent of any error dialog that
>> ShellExecute may need to display. If your program doesn't have any
>> windows, then use 0 -- zero -- for the handle value.
> 
> I have five different calls to ShellExecute.  Shouldn't I number the
> handles differently for each one?  I used 0 through 4, different in each 
> call.

Absolutely not. The function asks for a window handle. That's what you 
need to give it. None of the numbers from zero to four refers to a valid 
window, but only zero has special meaning ("the dialog box should have 
no parent window"). The others are simply invalid window handles.

If the function is going to display any dialog box, it will do so 
_before_ the function returns. Therefore, you'll only have one call 
active at a time, unless you're invoking the function from multiple 
threads simultaneously.

-- 
Rob
__________________________________________________
Delphi-Talk mailing list -> Delphi-Talk@elists.org
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to