after finding Iczelion's tutorials and playing around i have found 50 cool was to crash my computer.

I have also spent some time taking a tutorial and tinkering it a bit.

I have writen this little program which shows the number of running task on a system.

it works but is there a better way to get the refresh working?

at the moment i am doing this in the message loop and it works.

.ELSEIF uMsg==WM_TIMER
invoke InvalidateRect,hWnd,NULL,TRUE

.ELSEIF uMsg==WM_CREATE
invoke SetTimer,hWnd,1,5,NULL

i would like comment and sugestions from anyone.

full code attached in the zip.




Remember even a journey of a thousand miles starts with a single step.......
Posted on 2001-08-20 23:40:37 by robsonde
robsonde,

if you need a fast refresh you can try with a GAME LOOP:

MessageLoop pseudo:

call PeekMessage (instade of GetMessage)
call TranslateMessage
call DispatchMessageA

call GameLoop1 (so it run always !)

jmp MessageLoop


hope it help

bye A
Posted on 2001-08-21 06:28:54 by Bit7
Well that could be good but I dont need fast as such.

I want it to not flicker.

I will also take any comments about the rest of the code.

I am sure I have found the worst way to to most things :-)
Posted on 2001-08-21 22:01:11 by robsonde
Afternoon, robsonde.

If you don't want it to flicker so much, then don't update it every 5 milli-seconds:grin:

Try
invoke SetTimer,hWnd,1,1000,NULL ; update once every second

and see how it goes.

Cheers,
Scronty
Posted on 2001-08-21 22:24:44 by Scronty
thanks Scronty.

it works better now...

RTFM :-)

I thought I had it at half a second.
Posted on 2001-08-22 01:46:05 by robsonde