Hi guys, I'm new to programming. problem in anything, I created a program with the aid of GUI in masm editor and uploaded to the resources of 25 icons, please help, how to animate them in the tray and taskbar. I apologize for my bad English (it's all Google is guilty, he translated)))
I will be very grateful for help=)
Search function :U
http://www.masm32.com/board/index.php?topic=17923.msg151183#msg151183
i want animate this icons without dial inet conection :D , easy with invoke SetTimer with 200 ms delay :D
i have this project on Flat asembler, but i can't convert syntax or disasemble exe >masm :(
Quotei have this project on Flat asembler
::) your project.zip say what other
\MASM32\BIN\Rc.exe /v rsrc.rc
\MASM32\BIN\Cvtres.exe /machine:ix86 rsrc.res
i want animate this icons without dial inet conection :D , easy with invoke SetTimer with 200 ms delay :D
This is coding :bg
Look in to source and you can found this part to create the Notify Icon,Load the icons and the Timer part for Blinking icons
no , this project.zip im created in masm )) but i have working programm writed at fasm =)
i can't find animation function with timer at this post :(
this project in fasm . . .
so . . . someone has ideas how to implement it on masm32 ?
Uh, the same exact way you did it in FASM. You have no code in your MASM zip. Where is SetTimer, Shell_NotifyIcon and the rest of your FASM code?
I do not know how to implement this in masm . . .
should be pretty easy :P
i will have a look at it, tomorrow
i started out by examining the icons
there are 25 icons in the project
however, only 10 are unique :P
we can use icons 1 through 5 and 16 through 20 - only need 10
of course, we'll have to add a little code to select the right icon at the right time
but it will eliminate ~36 Kb from the resource section
eyes open:
1 = 6 = 11
2 = 7 = 12
3 = 8 = 13
4 = 9 = 14
5 = 10 = 15
eyes closed:
16 = 21
17 = 22 (22 has a flaw)
18 = 23
19 = 24
20 = 25
we could probably reduce it further by creating a single icon file with the 10 icons
we'll worry about that later
size of project does not matter :)
it's ok - it's a matter of efficiency :bg
almost done...
i have to go over and do a little favour for mom :P
i'll be back in an hour or so and finish it up
i wonder if we could get a moderator to move this thread to the Campus ?
thanks Michael :U
i have it going - i just need to finish the dialog box stuff and do clean-up
you can play with it....
ouuuch , thanks you very muck for this job. its wonderfuul :F
my pleasure :U
here is the finished version
added the dialog group box w/text
cleaned up some code
also cleaned up some of the anomalous pixels in the icons
i meant to mention....
the guy that wrote that fasm code had a habit of doing things twice :red
.wminitdialog:
invoke LoadIcon,[hInstance],1 ;1
invoke SendMessage,[hwnddlg],WM_SETICON,ICON_BIG,eax
invoke SetTimer,[hwnddlg],1,100,NULL ;1
mov [nIcon],1 ;1
mov [node.cbSize],sizeof.NOTIFYICONDATA
mov eax,[hwnddlg]
mov [node.hWnd],eax
mov [node.uID],NULL
mov [node.uFlags],NIF_ICON
mov [node.uCallbackMessage],NULL
invoke LoadIcon, [hInstance], 1 ;2
mov [node.hIcon],eax
invoke Shell_NotifyIcon, NIM_ADD,node
invoke SetTimer,[hwnddlg],1,100,NULL ;2
mov [nIcon],1 ;2
jmp .processed
Very Nice
good job :D very nice )
Quote from: dedndave on January 26, 2012, 01:27:29 AM
i meant to mention....
the guy that wrote that fasm code had a habit of doing things twice :red
.wminitdialog:
invoke LoadIcon,[hInstance],1 ;1
invoke SendMessage,[hwnddlg],WM_SETICON,ICON_BIG,eax
invoke SetTimer,[hwnddlg],1,100,NULL ;1
mov [nIcon],1 ;1
mov [node.cbSize],sizeof.NOTIFYICONDATA
mov eax,[hwnddlg]
mov [node.hWnd],eax
mov [node.uID],NULL
mov [node.uFlags],NIF_ICON
mov [node.uCallbackMessage],NULL
invoke LoadIcon, [hInstance], 1 ;2
mov [node.hIcon],eax
invoke Shell_NotifyIcon, NIM_ADD,node
invoke SetTimer,[hwnddlg],1,100,NULL ;2
mov [nIcon],1 ;2
jmp .processed
this is done for the tray and taskbar separately)
thanks guys :U
here is the code i replaced it with...
mov esi,offset nid
mov eax,hIcons
mov ebx,hWnd
xor edi,edi
mov [esi].NOTIFYICONDATA.hIcon,eax
INVOKE SendMessage,ebx,WM_SETICON,ICON_BIG,eax
mov [esi].NOTIFYICONDATA.cbSize,sizeof NOTIFYICONDATA
mov [esi].NOTIFYICONDATA.hwnd,ebx
mov [esi].NOTIFYICONDATA.uID,IDT_TIMER0 ;should probably be EDI (0)
mov [esi].NOTIFYICONDATA.uFlags,NIF_ICON
mov [esi].NOTIFYICONDATA.uCallbackMessage,edi
INVOKE Shell_NotifyIcon,NIM_ADD,esi
INVOKE SetTimer,ebx,IDT_TIMER0,TIMER_ELAPSE,edi
i load all the icon handles into an array during program initialization
in the code above, i had tried putting IDT_TIMER0 into the NOTIFYICONDATA.uID member during debug
it should be 0....