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