hey guys
i know something is wrong in my code...please help me find the bug.
It works just once and stops.i mean it minimizes any one window,
instead of minimizing all top level windows.


@@loop:
invoke EnumWindows,HidenPatch1,0
INC times
cmp times,10h
jl offset @@loop

HidenPatch1 PROC hWnd:HWND
invoke FindWindow,0,edx
mov hWnd,eax
invoke ShowWindow, hWnd, SW_MINIMIZE
xor eax,eax
ret
HidenPatch1 endp

Thank you in advance
Posted on 2004-10-14 21:24:40 by nickdigital
Also tell me if there is some better soln. for minimizing all top level windows. just to tell you that i dont wanna use sendmessage to the taskbar, so tell me some other soln.

thanks once again
nickdigital
Posted on 2004-10-14 21:29:01 by nickdigital
hii
i can think of two ways

try PostMessage,HWND_BROADCAST (to send all top windows level a msg)


or simulate windowskey+d

bye

eko
Posted on 2004-10-15 08:22:32 by eko
Return Value

To continue enumeration, the callback function must return TRUE; to stop enumeration, it must return FALSE.
Your zeroing your return value, of course your going to stop.

You must return a TRUE to keep processing to the next window. Windows will stop calling your routine when it runs out of windows.

Regards, P1 8)
Posted on 2004-10-15 16:11:21 by Pone
Hi Eko
i ll try that ..
thanks a lot
-----------------------------
hi Pone

thanks a lot for correcting me.
it was a big blunder ....
thank you once again

nickdigital
Posted on 2004-10-15 17:39:11 by nickdigital
ive had the same problem with EnumWindows.
but my callback func did return true but it was only called once!?

i am jack's lack of understanding...
Posted on 2004-10-17 18:34:18 by enodev