News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

AnimateWindow proc or The AnimateProc function

Started by hfheatherfox07, August 27, 2012, 02:23:09 AM

Previous topic - Next topic

hfheatherfox07

Hi,
Is there  AnimateWindow proc inside a copy of  user32.lib.asm ? If so where can I get my hands on it?

What I need is AnimateWindow proc

I have seen an example that I think they use that but to animate the text on the screen....So I was thinking to modify that proc to  "invoke SelectObject, ps.hdc, hFont"

In the win32 SDK Refrences I have found :

AnimateProc

2.0     

The AnimateProc function is an application-defined callback function that provides information to DrawPenDataEx on a periodic basis. The name AnimateProc serves only as a placeholder; the function can have any name.
BOOL CALLBACK AnimateProc( HPENDATA hpndt, UINT iStrk, UINT cPnt, UINT FAR * lpuSpeedPct, LPARAM lParam )

Parameters

hpndt

Handle to the pen data currently being drawn.

iStrk

Zero-based index to the stroke being drawn, or about to be drawn.

cPnt

Count of points already drawn in this stroke.

lpuSpeedPct

Address of the speed-percent value.

lParam

Application-specific data passed to the callback. This value is specified in ANIMATEINFO.

Return Value

The callback function must return TRUE to continue drawing the pen data. Returning FALSE stops animation immediately.

Comments

One of the parameters of DrawPenDataEx provides the address of this callback function. The application must create an instance of this function using the MakeProcInstance function, and ensure that it is exported in the module-definition (.DEF) file.
The application can monitor the state of animation or provide the user with an opportunity to change the speed of animation, including pausing it, using the value addressed by lpuSpeedPct.

The application can also pass application-specific information to the callback in lParam. For example, a handle to the DC
(device context) can be passed.
Callbacks are made at the beginning of the stroke or time interval, before any drawing is done. However, if AI_SKIPUPSTROKES is specified, a callback is not made before up strokes.

See Also

DrawPenDataEx,  ANIMATEINFO
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

dedndave


hfheatherfox07

I think I did not make my self too clear ...

I am looking for the structure of it ...Like the structure of AW_ACTIVATE... so I can animate text that way not a window
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

dedndave

still not very clear - lol
a "structure" is a data type
AW_ANIMATE is an equate, and is described in that link i posted

what you may be after is the code for the procedure, which is "beyond the scope of this forum", as it would involve reversing the OS

but - you might want to look up the AlphaBlend function

hfheatherfox07

Quote from: dedndave on August 27, 2012, 02:38:05 AM
still not very clear - lol
a "structure" is a data type
AW_ANIMATE is an equate, and is described in that link i posted

what you may be after is the code for the procedure, which is "beyond the scope of this forum", as it would involve reversing the OS

but - you might want to look up the AlphaBlend function

I did not think that was reversing LOL ...I thought hutch had it in the user32.lib.asm
The only thing I reverse is my car LOL
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

hfheatherfox07

I did not think of this but maybe I can draw my text in a static and than select the static handle
I got to try it ......
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

ragdog


AnimOpen proc hWnd:dword
                              invoke GetTickCount
                              movzx eax,al
                              bswap eax
                              rol eax,4
                              movzx eax,al
                              or al,al
                              jnz @F
                             
                              add anim,10h
                             
                         @@:
                              add anim,eax
                       
                     
                               push    anim
                               push    1F4h
                               push    hWnd
                               call    AnimateWindow
                               ret
AnimOpen endp

AnimClose proc hWnd:dword
                               mov eax,anim
                               sub eax,30000h
                               
                               push    eax
                               push    1F4h
                               push    hWnd
                               call    AnimateWindow
                               ret


AnimClose endp


[code]
.elseif eax==WM_INITDIALOG
         
push hWnd
call AnimOpen

.ELSEIF eax == WM_CLOSE
 
push hWnd
call AnimClose

[/code]

dedndave

many of us do a little reversing from time to time - lol
in some cases, we just want to know which API functions are used to perform a specific task
then - we can figure it out from there
but - it saves time if you know which functions to research

i reverse yahoo messenger to remove the advertisements   8)
i just don't discuss it here, is all

hfheatherfox07

Quote from: dedndave on August 27, 2012, 03:08:21 AM
many of us do a little reversing from time to time - lol
in some cases, we just want to know which API functions are used to perform a specific task
then - we can figure it out from there
but - it saves time if you know which functions to research

i reverse yahoo messenger to remove the advertisements   8)
i just don't discuss it here, is all

Not to seem Stupid but I still have a lot to learn before I can even think of doing stuff like that LOL
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

hfheatherfox07

For Example I want to animate some text form center out
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

hfheatherfox07

Quote from: ragdog on August 27, 2012, 02:59:11 AM

AnimOpen proc hWnd:dword
                              invoke GetTickCount
                              movzx eax,al
                              bswap eax
                              rol eax,4
                              movzx eax,al
                              or al,al
                              jnz @F
                             
                              add anim,10h
                             
                         @@:
                              add anim,eax
                       
                     
                               push    anim
                               push    1F4h
                               push    hWnd
                               call    AnimateWindow
                               ret
AnimOpen endp

AnimClose proc hWnd:dword
                               mov eax,anim
                               sub eax,30000h
                               
                               push    eax
                               push    1F4h
                               push    hWnd
                               call    AnimateWindow
                               ret


AnimClose endp


[code]
.elseif eax==WM_INITDIALOG
         
push hWnd
call AnimOpen

.ELSEIF eax == WM_CLOSE
 
push hWnd
call AnimClose

[/code]

what is "anim" ?

just " anim dd ?"
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

qWord

I'm afraid that AnimateWindow() isn't designed for such usage...
MREAL macros - when you need floating point arithmetic while assembling!

hfheatherfox07

#12
Quote from: qWord on August 27, 2012, 03:41:35 AM
I'm afraid that AnimateWindow() isn't designed for such usage...

Thank you !

I have seen an example that showed text animated the same way ...so I thought .....

:(
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

ragdog

hfheatherfox07

It is not to easy animate a scroller like crazy words :biggrin:

What serach you really?

it gives 1000te ways of a gdi scroller

qWord

Quote from: hfheatherfox07 on August 27, 2012, 03:13:20 AM
For Example I want to animate some text form center out
In the attachment a example that is using SetWorldTransform to "zoom" text in and out.
The code can be reused: all related code is stored in StaticHook.asm/inc.
MREAL macros - when you need floating point arithmetic while assembling!