In an app I have an icon on the tray which will make a window visible again using ShowWindow API.
This all works fine. Only thing is the window doesn't really have the focus - it is the topmost window
(I use SetForegroundWindow API to get it there), but the titlebar isn't colored until I click it.
Is there a way to get this window selected, i.e. in the state is was before it was hidden?

I tried Putfocus API, didn't work.

Maybe generating a mouse click at it?

P.S.
What's the best way of reading a windows size (not just min or max), position, etc and
restoring a hidden window to the state it was before being hidden? The ShowWindow API restores
the window to a min size.

[Edited by dsy5 on 09-28-2000 at 07:49 PM]