download the sample file for more info.

Thanks to Iczelion from where i learn how to use a tray icon :)
Posted on 2001-12-21 09:46:25 by Max
This little example grab 99% CPU time :(
Posted on 2001-12-30 07:57:14 by Torak
i dont say its the 100% perfect way.....its the only way i know and i try to share what i know.
if you know a better way then post it to help all but saying its bad coded or you know it better help no one.
Posted on 2001-12-30 09:53:30 by Max
Read Iczelion's tutorials: http://spiff.tripnet.se/~iczelion/tutorials.html

Tutorial 10: Dialog Box as Main Window
Tutorial 23: Tray Icon

You should look first Dialog Box example to see how to register own class to used by dialog, and msg loop processing. This will solve CPU time eating.

There is couple tray example in source code section but masm specific syntax. I looked fast and they all use LoadIcon, but there was litle trick. If you load icon in tray using LoadIcon the icon seems little blur. This is becose windows some strange reason resize icon difrents way to title bar and system tray. This problem can solved making small 16x16 icon and load it using LoadImage.

You can set title bar in resource file. You don't need to code it if you don't want. It look like this line is incorrect:

call SendMessageA, hwnd_, WM_SETICON, ICON1,hicon

There should be wParam that have icon type, probebly ICON_BIG. ;)
Posted on 2001-12-30 16:03:11 by Torak
max,

what is your problem? Torak told you a "bug" in your source code. Thats friendly :) . Do you really think critics is allowed only in combination of supplying an "improved solution"? No!

japheth
Posted on 2001-12-30 17:30:14 by japheth
Ok this isn't solving anything...

Max, keep up the good work...

Lets try to keep this civil... he didn't do this on purpose (just a little protective is all) :)

Happy new year,
sliver :) :) :)
Posted on 2001-12-30 18:10:44 by Sliver
As for the "icon looks blurred", you should be happy about this :).
It uses a filtering method (bilinear?) to smoothen out the icon when
doing resize. Yes, this makes it look a bit blurry, but without it the
result would have been *ugly*.
Posted on 2001-12-30 22:39:38 by f0dder
------------
what is your problem? Torak told you a "bug" in your source code. Thats friendly . Do you really think critics is allowed only in combination of supplying an "improved solution"? No!
------------

hm hm hm
ok sorry ,i excuse myself :-)

critic is ok and i need it to become better ,simple.
i think i get it on the wrong side.
i read first the post about with the critic to my HD sample and then this .... i feel a bit angry about people who dont see that im a newbie and only try to share stuff...if its wrong or not.
if i personal know something better i try to show the way and i never say : he using xyz is better....cu

believe it or not...since i start with tasm i never use a tutorial from iczelion or any other for masm.
this is the first one i use to get a taskicon.

so all i know today came from tasm sources or questions i ask here since 1 year :-)
if there would be more comments in the sources my english would be much better today ....but as all know comments are rare....hehe

i think a long time if i should post here code snippets ,because i know how i code.
last i think it dosnt matter if the code looks bad or if there are little misstakes inside....all in all its better then no snippets.

but the biggest problem is that im alltime alone while coding ,because i know noone here who try to learn coding too ,so i must learn to life with all here and that means i must understand first what some posts mean :-)

but thanks that u dont kick me out and try to explain me how u mean it.
Posted on 2001-12-31 05:50:25 by Max
Originally posted by Max
i read first the post about with the critic to my HD sample and then this .... i feel a bit angry about people who dont see that im a newbie and only try to share stuff...if its wrong or not.

When you released someting intersting you receive critics, that's normal. There will be always be someone that probably know better solution than you or i. When i test your application and notice that there was fatal desing mistake i choise to press reply button. If some one don't tell that. You and maby some one else think that it allright and continue the bad code and make same mistake in future.

believe it or not...since i start with tasm i never use a tutorial from iczelion or any other for masm.
this is the first one i use to get a taskicon.

so all i know today came from tasm sources or questions i ask here since 1 year :-)


It isin't are necessary to read extralcy some assembler tutorial for someting subject. But you must know how to do it in assembler and windows sides. There isin't are perfect tutorials.

i think a long time if i should post here code snippets ,because i know how i code.

So, you should be happy to get critic, if you know that your code isin't are perfect.

last i think it dosnt matter if the code looks bad or if there are little misstakes inside....all in all its better then no snippets.

Time go on, and there will be other newbie that look your code. He problebly don't know how to solve bad desing solution, or code isin't are working eny more. If he tired fix that, there will be one coder less. Example your tray program problebly work fine in win 9x, but it isin't work my W2K machine.

but the biggest problem is that im alltime alone while coding ,because i know noone here who try to learn coding too ,so i must learn to life with all here and that means i must understand first what some posts mean :-)

We all try to learn others. I think that why this msg board is exist.
Posted on 2001-12-31 11:15:43 by Torak

As for the "icon looks blurred", you should be happy about this :).
It uses a filtering method (bilinear?) to smoothen out the icon when
doing resize. Yes, this makes it look a bit blurry, but without it the
result would have been *ugly*.


Blurryt icons isin't are always problem. But sometime they have. It dependent on icon type and purpose. When you make two icon big and small you can use small icon (if is size is 16x16) to system tray. Then you get crystal clear picture, whit out blur.
Posted on 2001-12-31 11:30:41 by Torak