0
我想在Visual Studio 2005中使用VC++創建一個BalloonToolTipIcon。我能夠創建一個工具提示,如圖所示 「http://www.c-sharpcorner.com/UploadFile/mahesh/tooltip-in-C-Sharp/Images/ToolTipImg2.jpg」但我希望它是如果這種類型「http://www.quantumsoftware.com.au/Images/Products/WindowsFormsComponents/BalloonToolTip.gif」...在Visual Studio 2005中使用VC++的氣球工具提示圖標
我正在使用以下代碼來創建此工具提示。任何人都可以告訴我哪些屬性我沒有正確設置?
NOTIFYICONDATA nidApp;
nidApp.cbSize = sizeof(NOTIFYICONDATA); // sizeof the struct in bytes
nidApp.hWnd = (HWND) hWnd; //handle of the window which will process this app. messages
nidApp.uID = IDI_SYSTRAYDEMO; //ID of the icon that willl appear in the system tray
nidApp.uFlags = NIF_INFO;
nidApp.hIcon = hMainIcon; // handle of the Icon to be displayed, obtained from LoadIcon
nidApp.uCallbackMessage = WM_USER_SHELLICON;
wcscpy_s(nidApp.szInfo, szinfo);
LoadString(hInstance, IDS_APPTOOLTIP,nidApp.szTip,MAX_LOADSTRING);
// Add the balloon tip
Shell_NotifyIcon(NIM_ADD, &nidApp); //Show the systary icon
在此先感謝
我不知道如何粘貼圖像,所以我只是向你展示來自互聯網圖像的示例。 – Arti 2013-03-18 17:05:00
我正在使用以下聲明,但它不會給我所需的輸出。 Shell_NotifyIcon(NIM_SETVERSION,&nidApp); – Arti 2013-03-18 17:09:07
@Arti:閱讀[MSDN文檔](http://msdn.microsoft.com/en-us/library/windows/desktop/bb762159.aspx),特別是需要設置哪些字段。 'NIM_SETVERSION'顯然需要一個版本號。 – MSalters 2013-03-19 07:42:53