#include #include #include "XWNotifyImages.h" extern HINSTANCE g_instance; XWNotifyImages g_XWNotifyImages; // DVB19Oct99 - new version of add that accepts resource id, and assumes icon is in this DLL jint XWNotifyImages::add( jint resourceid ) { // Load icon from this dll's resource fork HICON l_icon = LoadIcon( g_instance, MAKEINTRESOURCE( resourceid ) ); if( !l_icon ) return -1; return (jint) l_icon; } jint XWNotifyImages::add( const char *filename ) { // Extract icon from file HICON l_icon = ExtractIcon( g_instance, filename, 0 ); if( !l_icon ) return -1; return (jint) l_icon; } void XWNotifyImages::remove( jint image ) { HICON l_icon = (HICON) image; // Destroy icon DestroyIcon( l_icon ); }