-
Question #1
I need to supply an icon handle for the tray. Since this program I'm writing doesn't have any forms (I use CreateWindowEx so that I have a hWnd to use) I can't do what I usually do and use the handle of the form's icon.
However, I did add a resource file with an icon in it. How may I supply a handle to this icon to be used in the NOTIFYICONDATA structure?
Question #2
Since I don't have any forms, I cannot specify in the project properties the icon that I want as my program's icon. How can I specify the program's icon despite?
Remark:
I do realize that it would oh so much easier to write this program using a VB form. The reason I'm doing things this way is for the challenge of making the program pure API and as small as possible - 20K is what I've achieved. 24K with the form. 16K is the minimum possible. I'm using VB6 professional.
-
You can get the Picture using the LoadResPicture function.
By the way: You 16K App will become roughly 2MB including the runtimes :)
-
I knew how to get the picture. :) I'm wanting the handle to the picture. Believe me, I couldn't get this far without knowing how to read documentation. :) Thanks though.
As for the 2M. It's not really that necessary when most people have the VB runtimes. Even if I did distribute. I'd distribute the runtimes separately rather than making an installation package. So it's all good.