C++ 使用VC++;在VisualStudio2005中
我试图在VisualStudio2005中使用VC++创建一个BallookToolTipcon。我可以创建一个工具提示,如图所示 “但我希望是这样的,如果这种类型” 我使用以下代码创建此工具提示。有人能告诉我哪些属性设置不正确吗C++ 使用VC++;在VisualStudio2005中,c++,visual-c++-2005,balloon-tip,C++,Visual C++ 2005,Balloon Tip,我试图在VisualStudio2005中使用VC++创建一个BallookToolTipcon。我可以创建一个工具提示,如图所示 “但我希望是这样的,如果这种类型” 我使用以下代码创建此工具提示。有人能告诉我哪些属性设置不正确吗 NOTIFYICONDATA nidApp; nidApp.cbSize = sizeof(NOTIFYICONDATA); // sizeof the struct in bytes nidApp.hWnd = (HWND) hWnd; /
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
提前谢谢
dwInfoFlags=NIIF\u INFO
。此图标位于szInfoTitle
的左侧,因此您也应该设置它。(我想你是的,看屏幕截图,但我在代码中没有看到)我不知道如何粘贴图像,所以我只是向你们展示了来自互联网图像的样本。我使用了下面的语句,但它并没有给出我想要的输出。Shell_NotifyIcon(NIM_SETVERSION和nidApp)@Arti:请阅读,特别是您需要设置的字段
NIM_SETVERSION
显然需要一个版本号。