i can show an icon on notify area:

NOTIFYICONDATA NID;

//on main
NID.cbSize = NOTIFYICONDATA_V2_SIZE; //if i use the NOTIFYICONDATA_V3_SIZE
//the compiler enters on conflits
    NID.hIcon = test2;
    NID.uCallbackMessage = WM_USER + 1;

    NID.hWnd = a;
    NID.uID = 01;
    NID.uVersion=4;
    NID.uTimeout=500;
    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?

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

Edited 1 Year Ago by cambalinho

This question has already been answered. Start a new discussion instead.