Click here to Skip to main content
15,886,110 members
Articles / Desktop Programming / ATL

Placing an icon in the system tray from an ATL COM server - with minimum hassle

Rate me:
Please Sign up or sign in to vote.
4.72/5 (10 votes)
23 Jun 20027 min read 241.1K   2.1K   57  
This article describes a helper class that assists with placing an icon in the shell (aka "system tray"), and changing the tip text. You can get this functionality by simply deriving your ATL object from the helper class.
#if !defined(AFX_DLLDATAX_H__4D31C708_035C_4070_805C_42CB87D9C6F1__INCLUDED_)
#define AFX_DLLDATAX_H__4D31C708_035C_4070_805C_42CB87D9C6F1__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifdef _MERGE_PROXYSTUB

extern "C" 
{
BOOL WINAPI PrxDllMain(HINSTANCE hInstance, DWORD dwReason, 
	LPVOID lpReserved);
STDAPI PrxDllCanUnloadNow(void);
STDAPI PrxDllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv);
STDAPI PrxDllRegisterServer(void);
STDAPI PrxDllUnregisterServer(void);
}

#endif

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DLLDATAX_H__4D31C708_035C_4070_805C_42CB87D9C6F1__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United Kingdom United Kingdom
I first started tinkering with a ZX81 back in 1981 and it's lovely blocky graphics, teaching myself Z80 assembler and BASIC. I come from a hardware background and electronics - I started out in embedded software for avionics but soon moved onto PC platforms.

Java and C++ are my prefered language but also dabble in VB and .NET.

I'm a team leader with Nokia developing Series 40 features - it's a cool place to work!

Comments and Discussions