The icon of an application is stored as a 'tAIB' 1000 resource. (The small icon 
is stored as a 'tAIB' 1001 resource - but many applications don't have small 
icons.) Presumably, you know the icon of which application you want to use 
(e.g., yours or some standard application), so you can open it an get this 
resource from it. Once you do that, you can draw the contents of the resource 
(i.e., the icon) directly on the screen using the WinDrawBitmap function.

Do not forget to lock the resource handle before using it and to unlock and 
release it after you draw it on the screen. Also, in case you're thinking of 
doing all this on frmOpenEvent, make sure that you draw the current form first.

You can use the same approach to draw any other bitmap (not just an icon) that 
is stored in a resource (although, of course, it resource ID and number would 
be different). But the image *has* to be present there somehow. If the 
application doesn't already contain it, you can't avoid creating a bitmap 
resource with Constructor or whatever other resource editor you're using; the 
image can't appear out of thin air.

Regards,
Vesselin
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to