谁用过BCB2007,气泡通知不会弹出来,6.0的没问题 - C++ Builder / Windows SDK/API
在6.0里实验的代码没问题,移植到2007中就不行了,托盘区域只会出现一个图标,不会弹出气泡通知了,6.0里好使呀,调用的还是API,按理说应该没有关系吧,
下面是代码
NOTIFYICONDATA IconData = {0}; IconData.cbSize = sizeof(NOTIFYICONDATA); IconData.hWnd = this->Handle; IconData.uID = 0; IconData.uFlags = NIF_INFO|NIF_ICON|NIF_TIP|NIF_MESSAGE; IconData.hIcon = icon->Handle;//Application->Icon->Handle; lstrcpy(IconData.szTip, TEXT("hahaha")); lstrcpy(IconData.szInfo, TEXT("Your message text goes here.")); lstrcpy(IconData.szInfoTitle, TEXT("Title")); IconData.uTimeout = 2000; // in milliseconds IconData.dwState = NIS_SHAREDICON; IconData.dwStateMask = 0; IconData.dwInfoFlags = NIF_INFO; IconData.uCallbackMessage = WM_DELETEMESSAGE;// NIN_BALLOONUSERCLICK ; Shell_NotifyIcon(NIM_ADD, &IconData);