[HELP]关于气泡窗口的问题(sdk)

PhoenixWaVe 2004-09-01 08:56:21
在MSDN中有如下内容
EM_SHOWBALLOONTIP
The EM_SHOWBALLOONTIP message displays a balloon tip associated with an edit control.

To send this message, call the SendMessage function with the following parameters.

LRESULT SendMessage(
(HWND) hWndControl, // handle to destination window
(UINT) EM_SHOWBALLOONTIP,
(WPARAM) wParam, // not used; must be zero
(LPARAM) lParam // (LPARAM) (PEDITBALLOONTIP) peditballoontip
);


Requirements
Header: Declared in Commctrl.h.




我包含了Commctrl.h
定义了一个全局变量
PEDITBALLOONTIP tip;
并初始化了各个域
tip->cbStruct=sizeof(tip);
tip->pszText="a";
tip->pszTitle="a";
tip->ttiIcon=TTI_WARNING;
在初始对话框时发送消息
SendMessage(
hDlg,
(UINT) EM_SHOWBALLOONTIP,
(WPARAM) 0,
(LPARAM) tip
);




编译时出现如下错误

正在编译...
ex.cpp
f:\My Documents\Projects\ex\ex.cpp(16) : error C2146: 语法错误 : 缺少“;”(在标识符“tip”的前面)
f:\My Documents\Projects\ex\ex.cpp(16) : error C2501: “PEDITBALLOONTIP” : 缺少存储类或类型说明符
f:\My Documents\Projects\ex\ex.cpp(16) : error C2501: “tip” : 缺少存储类或类型说明符
f:\My Documents\Projects\ex\ex.cpp(115) : error C2227: “->cbStruct”的左侧必须指向类/结构/联合
类型是“int”
f:\My Documents\Projects\ex\ex.cpp(116) : error C2227: “->pszText”的左侧必须指向类/结构/联合
类型是“int”
f:\My Documents\Projects\ex\ex.cpp(117) : error C2227: “->pszTitle”的左侧必须指向类/结构/联合
类型是“int”
f:\My Documents\Projects\ex\ex.cpp(118) : error C2227: “->ttiIcon”的左侧必须指向类/结构/联合
类型是“int”
f:\My Documents\Projects\ex\ex.cpp(121) : error C2065: “EM_SHOWBALLOONTIP” : 未声明的标识符


请问这是怎么回事,我明明已经包含了要求的头文件了,为什么还有这样的错误提示?
谢谢了
...全文
205 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
PhoenixWaVe 2004-09-03
  • 打赏
  • 举报
回复
有谁知道呀?
hhjdk967 2004-09-03
  • 打赏
  • 举报
回复
你的系统要2000以上,并且要保证你的程序以后在2000以上的系统运行
To use this API, you must provide a manifest specifying Comclt32.dll version 6.0.
菜牛 2004-09-03
  • 打赏
  • 举报
回复
Message Information

Header Declared in Commctrl.h
Minimum operating systems Windows XP
casinosun 2004-09-03
  • 打赏
  • 举报
回复
添加include的路径
casinosun 2004-09-03
  • 打赏
  • 举报
回复
PEDITBALLOONTIP 定义的头文件,或者按F12,找到定义处,包含该头文件
mahatma_cn 2004-09-01
  • 打赏
  • 举报
回复
还有一种可能就是确定你添加了预处理代码:#define _WIN32_WINNT 0x501
mahatma_cn 2004-09-01
  • 打赏
  • 举报
回复
更新你的Microsoft SDK;或者在目录设定中确定你的sdk\include目录在vc自带的头文件之前。
mahatma_cn 2004-09-01
  • 打赏
  • 举报
回复
大概看了一下,主要是缺少声明文件。

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧