I know small things amuse small minds but I have an excuse, this one took slightly less than 5 minutes to write. A member in the win32asm forum asked how it was done so I pelted this one together and posted it here.
[attachment deleted by admin]
Just for fun, I would like to have the caption scroll follow the mouse around inside the window. :green2
Regards, P1 :8)
Nice effect! And I can think of a use for it...
Paul
Optimisation is a form of addiction but a least its good pactice. :bg
Here is the algo in the example tweaked a little.
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
OPTION PROLOGUE:NONE ; turn off the stack frame
OPTION EPILOGUE:NONE
rotate_caption proc pbuf:DWORD
mov edx, [esp+4] ; load string address in EDX
mov cl, [edx] ; get 1st byte of string
add edx, 1 ; move to next location in string
@@:
mov al, [edx] ; read character into AL
add edx, 1 ; increment addess
test al, al ; test if AL = 0
jz @F ; exit loop if it is
mov [edx-2], al ; write AL back to buffer
jmp @B
@@:
mov [edx-2], cl ; write 1st byte to end
mov BYTE PTR [edx-1], 0 ; write terminator
ret 4 ; balance the stack
rotate_caption endp
OPTION PROLOGUE:PrologueDef ; turn it back on again
OPTION EPILOGUE:EpilogueDef
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
Hi Hutch,
Nice demo :U