Restoring minimized window
hi all..
i'm triying to restore a window that is minimized. i have the handle of the process and i can get the hwnd of the window with GethWndFromProcessID.
But im using SetWindowPos to get the windows, but if the proccess if minimized it get the focus but remain minimized... i want to restore it to it previous state.. maybe there is an api i didnt find around it to do it???
my parameter to SetWindowPos are hVentana, HWND_TOP, 0, 0, 0, 0, TOPMOST_FLAGS
hventana = handle to the window
HWND_TOP = Places the window at the top of the Z order.
TOPMOST_FLAGS =
SWP_SHOWWINDOW = Displays the window. OR
SWP_NOMOVE = Retains the current position (ignores the X and Y parameters). OR
SWP_NOSIZE = Retains the current size (ignores the cx and cy parameters).
SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
looks like the parameters are wrong, but at least i get to change the focus to that windows...
any idea??? or any other api???
HTH
Gonzalo
__________________
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the proof.
================================================== =========
|