MSN Messenger like Tray Balloon

Friday Nov 2nd 2001 by Rajesh C K R
Share:

This simple class CTBalloon which is derived from CWnd can be used to show the tray balloon similiar to the one that appears with MSN messenger.

This simple class CTBalloon which is derived from CWnd can be used to show the tray balloon similiar to the one that appears with MSN messenger. I have used the CGradiant class which appeard in the artile Enhanced ProgressBar Control v1.1 by Yury Goltsman.

The following snippet shows how easy it is to use the class and incorporate it into your applications.

CTBalloon * pballoon = new CTBalloon(150,100);
pballoon->SetText("Hello World - This is a sample message");
pballoon->SetLifeTime(4);
pballoon->CreateAndShow();

The following are the various functions of the class.

CTBalloon(UINT nWidth, UINT nHeight) : Constructor, nWidth and nHeight are the dimensions of the balloon window. void SetText(CString str) : Sets the text that will be shown on the balloon window void SetLifeTime(UINT secs) : Sets the life time in seconds of the window. BOOL CreateAndShow() : Creates the window and shows the animated balloon window. The window will be destroyed by itself.

Please let me know of any problems or improvements. Thanks and good luck.

Downloads

Download - 25 Kb
Share:
Home
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved