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.