I'm trying to use the ShowWindow API to maximize an Outlook Express "new mail"
window, but it fails on the first call. Subsequent calls work fine. A check
of the Win32hlp file confirms that "this parameter is ignored the first time an
application calls ShowWindow" ("parameter" being #SW_MAXIMIZE).
Basically, I need to somehow send a "dummy" ShowWindow call to the target first,
then another to make it actually maximize. But whatever I try doesn't work.
Here's a code snippet if you can help...
Code: Select all
r=FindWindow_(0,"New Message") ; Watch for new Outlook Express email.
If r0 And IsZoomed_(r)=#FALSE
ShowWindow_(r,#SW_MAXIMIZE) ; Doesn't work on *first* call!
EndIf
PB - Registered PureBasic Coder
