News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

sys tray icon help?

Started by trodon, October 22, 2006, 05:15:01 PM

Previous topic - Next topic

trodon

hi, i have some troble with how to make some dialog in tray icon  :'(
i was check iczilion 23 tutorial and many more but thats litle diferent, please download my attachment.
i need example how when i press this button, that dialog moves intro system tray

thanks for ansvers  :U

[attachment deleted by admin]

Tedd

Here's an example of adding an icon into the tray and reacting to mouseclicks in it.
What you need to do to put a window 'in' the tray is minimize your window (to show it's going 'down into the tray'), hide it (so it's not in the statusbar anymore), and then add the icon into the tray. Then when the tray icon is clicked, you can remove the tray icon, reshow your window, and unminimize it.
For minimize/maximize, and show/hide, you can use a call to ShowWindow for each :wink


[attachment deleted by admin]
No snowflake in an avalanche feels responsible.

trodon

hi Tedd,
thank you for the ansver.
I am tray to make something but i am making some mistake somwhere, can you look intro my code and put me in right direction?
Thanks.


[attachment deleted by admin]

P1

Quote from: trodon on October 23, 2006, 02:46:18 PMI am tray to make something but i am making some mistake somwhere, can you look intro my code and put me in right direction?
Not many of us is going to write code for you.  Especially, when it looks like you have not tried to do much.  Tedd's example code works.  If nothing else, edit/re-write his code from a windows style to a dialog style.  And you will have a working shell program.

Regards,  P1  :8)

Hint: There are plenty of working dialog code in Examples of MASM32.

trodon

hi P1,
i was not asking to someone write real program for me, thats only small example with one function.
but if you dont want to help me ok, thats your problem.

P1

Quote from: trodon on October 24, 2006, 09:49:59 PMi was not asking to someone write real program for me,
Then finish your program, THEN ask for help.
Quote from: trodon on October 24, 2006, 09:49:59 PMthats only small example with one function.
Then this is good start to building your skills as a "Best in Class" assembly language programmer.

Enjoy your work   :U

Regards,  P1  :8)

Tedd

It is only a small example with one function (plus some extra function-ality!) but it does give you all you need to know - if you work through it :P

1. Take my source, modify it to create a dialog, add two buttons to the dialog - "On" and "Off". Make sure there IS an (16x16) icon included in your resource file.
2. Disable the code that adds the tray icon automatically. Add code so that when "On" is pressed, the tray icon is added. And removed when "Off" is pressed.
3. Now remove the "Off" button, and add code so that the icon is removed when clicked.
4. Add to that code so that the window minimizes when "On" is pressed, and restored when the icon is clicked.
5. Hide and show the window appropriately.



If someone doesn't want to help you, that would be 'your' problem, not really theirs -- they don't need your help :wink


P1 -- Down boy! Get that muzzle back on :lol
No snowflake in an avalanche feels responsible.