i can show an icon on notify area:


//on main
//the compiler enters on conflits
    NID.hIcon = test2;
    NID.uCallbackMessage = WM_USER + 1;

    NID.hWnd = a;
    NID.uID = 01;
    NID.dwInfoFlags = NIIF_INFO;
    strcpy(NID.szInfoTitle, "Test Title");
    //NID.hBalloonIcon=(HICON)test2;//no member
    strcpy(NID.szTip, "System Tray Icon: Hello World");

    NID.uFlags = NIF_TIP | NIF_ICON | NIF_MESSAGE | NIF_INFO | 0x00000080;

//how i show the icon:
Shell_NotifyIcon(NIM_ADD , &NID);

the icon and tooltip are showed, but not the ballon :(
what i'm doing wrong?

Recommended Answers

Notifications and the Notifications Area It also contains a Sample near the end that you can download and run.

Jump to Post

All 3 Replies

i'm sorry.... i continue with problems. i don't understand how can i show the balloon :(

the szInfo is the key: if is empty the balloon isn't showed.

  strcpy(NID.szInfo , "hello beaury");

if hBalloonIcon class member give us an error about not be a class member, use these line before includes files:

  #define NTDDI_VERSION 0x06000000

now we can use, too, the NOTIFYICONDATA_V3_SIZE and NIF_SHOWTIP consts ;)

for use the balloon icon, the dwInfoFlags must be NIIF_USER:

  NID.dwInfoFlags = NIIF_USER;

readers for use Notification messages, we must use the NIF_MESSAGE on uFlags class member.

thanks for all

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.