I want to do an animation with icons in the dialog titlebar (4 icons)
but i have this odd problem that title bar caption goes sometimes
over the icon...
Here is how I do it:

DlgProc proc hDlg:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM

Invoke SetTimer, hDlg, 10h, 80h, 0h


cmp dword ptr , 0
jz RestoreOriginalIcon
cmp dword ptr , 5000
jnz IncreaseCounter
mov dword ptr , 0
jmp QuitSimpleGfxStuff
Invoke SetWindowTextA, hDlg, offset new_caption
add dword ptr , 1000 ; the 4 icons are 1000/2000/3000/4000
Invoke LoadIcon, hInst, counter
Invoke SendMessage, hDlg, WM_SETICON, TRUE, eax
jmp EndSimpleAnimIcon
Invoke LoadIcon, hInst, 900
Invoke SendMessage, hDlg, WM_SETICON, TRUE, eax
Invoke SetWindowTextA, hDlg, offset old_caption

pls someone help me do this stuff properly, coz im sure there is somethin wrong in here=/
I really suck at coding win32gui
Posted on 2002-05-03 14:29:07 by DZA
Thats funny, my docs say

wParam = (WPARAM) (BOOL) fType; // icon size (large or small)
lParam = (LPARAM) (HICON) hicon; // handle of icon

An application sends the WM_SETICON message to associate a new big or small icon with a window. Windows draws the big icon when the window is minimized, and the small icon in the window's title bar.


Value of wParam. Specifies the icon being set. If TRUE, the message sets the big icon. If FALSE, the message sets the small icon.


Value of lParam. Identifies the new big or small icon. If this parameter is NULL, the icon indicated by fType is removed.

And I see you are setting the value to true which means your setting the large icon...
Posted on 2002-05-03 14:47:20 by Graebel
Example in RadAsm project:
Posted on 2002-05-04 16:00:39 by The Svin
thanks the svin, that's just what I needed:)
Posted on 2002-05-04 16:37:13 by DZA
You are wellcome :)
Posted on 2002-05-04 17:02:57 by The Svin