|
-
June 21st, 2005, 08:06 AM
#1
error creating balloon tip for tray icon
Hi all,
I'm having a problem in creating a balloon tip for tray icon.
I found a code from "msdn" , which is
#define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))
NOTIFYICONDATA IconData = {0};
IconData.cbSize = SIZEOF(IconData);
IconData.hWnd = hwndNI;
IconData.uFlags = NIF_INFO;
HRESULT hr = StringCchCopy(IconData.szInfo, ARRAYSIZE(IconData.szInfo), TEXT("Your message text goes here."));
if(FAILED(hr))
{
// TODO: Write an error handler in case the call to StringCchCopy fails.
}
IconData.uTimeout = 15000; // in milliseconds
Shell_NotifyIcon(NIM_MODIFY, &IconData);
but here in my application i.e. in win32, i'm not having either the NIF_INFO, nor IconData.szInfo, similarly timeout.
So please reply me what should I do to implement it.
Regards,
Gaurav
-
June 23rd, 2005, 08:55 AM
#2
Re: error creating balloon tip for tray icon
Please add "#define _WIN32_IE 0x0500" in your header file
-
June 23rd, 2005, 10:06 AM
#3
Re: error creating balloon tip for tray icon
Yes, as Wang suggested, you need to define your version BEFORE you include windows.h. Also, depending on what version of VC++ you're using, you may need to download the Platform SDK from Microsoft's website.
msdn.microsoft.com/platformsdk/
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|