[HELP]关于气泡窗口的问题(sdk)
在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” : 未声明的标识符
请问这是怎么回事,我明明已经包含了要求的头文件了,为什么还有这样的错误提示?
谢谢了