hi all

i've got a small problem using the AnimateWindow function on sturtup.
the window seems to be not completly drawn when i use it.
my controls are some kind of unvisible... i attached an example...
perhaps some1 knows how to solve it.
Posted on 2004-04-16 16:00:36 by jackson
Can you upload you code so we can study?
Posted on 2004-04-17 03:16:07 by purpleendurer
hi purpleendurer

please take a look into the attached archive.
it contains the code and an .exe.
it seems that the window needs to be updated while the blend effect has been done.
perhaps someone could give me a hint, coz i'm very new at asm-coding.
Posted on 2004-04-17 04:09:40 by jackson
What controls are not seen?
Posted on 2004-04-17 07:44:03 by roticv
Hi roticv


Here they are ;-)
Posted on 2004-04-17 11:17:50 by The SharK
Try using showwindow to show them?
Posted on 2004-04-17 11:48:53 by roticv
Hi, jackson

You do not upload two files: MainDlg.rc and AnimateWindowVer.rc.
I can not assemble this program.

Did you try to create the controls of Dialog in the Dialog init event?
Posted on 2004-04-17 21:56:19 by purpleendurer
Hi, jackson

I used my rsrc.rc to test and passed!

Your code missed to call the DefWindowProc() by following code:


.else
mov eax, FALSE
ret


please take a look into the attached archive.
Posted on 2004-04-17 22:17:42 by purpleendurer
hi

sorry for the missing files. the attached archive contain all files now. :)
but i still couldn't fix this problem. the Edit-Controls are still unvisible. :(

purpleendurer, you said i my proc should return FALSE to call the DefWindowProc().
well i'm not 100% sure but does the
xor eax,eax
ret

do the same?

is it possible that your Window passed it because of a different style?

Did you try to create the controls of Dialog in the Dialog init event?

i'm going to try this now :)
Posted on 2004-04-18 06:44:05 by jackson
Hi jackson


When I assemble the file using masm32, I can't see ANY window ?

hmm....what am I doing wrong....:(
Posted on 2004-04-18 07:52:09 by The SharK
any window!?
hmm... this is strange, and i have no idea why this could happen... :confused:
i compiled it with masm32 through RadAsm with the standart compiler settings and it seems to work...
what about the included .exe, does it display a Window?
Posted on 2004-04-18 08:05:55 by jackson
does it display a Window?


yep, that works okay, like the picture are attached earlier :)
Posted on 2004-04-18 08:16:51 by The SharK
Sorry, I did not test the program with EDIT control.

The EDIT control is not displayed at first.

I call the InvalidateRect() in WM_INITDIALOG as this:



.if wMsg == WM_INITDIALOG
invoke SendMessage, [hWnd], WM_SETTEXT, NULL, OFFSET g_szAnimWin
invoke GetModuleHandle, OFFSET g_szUser32Dll
invoke GetProcAddress, eax, OFFSET g_szAnimWin
mov [pAnimateWindow], eax

.if [pAnimateWindow]
push AW_BLEND + AW_ACTIVATE
push 400h ; time
push [hWnd] ; window Handle
call [pAnimateWindow]

.endif

invoke InvalidateRect, hWnd, 0, TRUE



then the two EDIT contols are not displayed at first, but they will be displayed automatic after the animate process finished, not need to move the dialog.
Posted on 2004-04-18 08:43:25 by purpleendurer
ok, thx...
do you think it is possible to update the EDIT controls or the whole Window during the animation?
Posted on 2004-04-18 09:05:55 by jackson
hi purpleendurer

Can you make it assemble using masm32, so it works :confused:
Posted on 2004-04-18 09:40:11 by The SharK
I created a edit cotrol in the init event of the dialog
but the result is same as the edit control included in resources.


According the message about AnimateWindow() in MSDN

The window procedures for the window and its child windows should handle any WM_PRINT or WM_PRINTCLIENT messages. Dialog boxes, controls, and common controls already handle WM_PRINTCLIENT. The default window procedure already handles WM_PRINT.

If a child window is displayed partially clipped, when it is animated it will have holes where it is clipped.


May be the edit control is clipped?
Posted on 2004-04-18 09:43:22 by purpleendurer
May be the edit control is clipped?

nop, the edit controls arent clipped...
:notsure:
Posted on 2004-04-18 15:27:53 by jackson

hi purpleendurer

Can you make it assemble using masm32, so it works :confused:


Yes, my program assembled in masm 32 v8, WINDOWS 2000 PRO.

What question have you met?
Posted on 2004-04-18 22:36:36 by purpleendurer
Hi purpleendurer


ok, it works now - just have to rename the resource file to rsrc.rc so
qeditor would create the resource file ;)
Posted on 2004-04-19 00:28:38 by The SharK