![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
VISUAL C++
kofandlizi
这个作者很懒,什么都没留下…
展开
-
“static_cast”: 无法从“void (__thiscall CMyNetChatDlg::* )(WPARAM,LPARAM)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)”
<br />解决方法:<br />把原来的消息函数原型改为: <br /><br />afx_msg LRESULT OnMyMessage(WPARAM wParam, LPARAM lParam); <br /><br /><br />LRESULT CMyWnd::OnMyMessage(WPARAM wParam, LPARAM lParam) <br />{ <br /> return 0; <br />}原创 2011-05-27 18:12:00 · 4590 阅读 · 1 评论 -
MFC 自定义消息四步曲
1. 定义全局变量或宏 #define WM_MyMessage (WM_USER + n) n为数字到少大于100 或者用 const UINT WM_MYMESSAGE = WM_USER + n 一般可以加在stdafx.h 或resource.h 或*.app.h中。 他们都是全局变量头文件所以都可以. 2. 在所在类的*.H文件增加消息函数声明. protected: //{{AFX_MSG(CChildView) afx_msg LRESULT OnMyMess转载 2011-06-01 01:35:00 · 1092 阅读 · 0 评论 -
用printf输出长整形__int64
printf(“%I64d”,num); 如果要输出16进制数的话,就直接将d改成x。 __int64是visual c++特有的64位整形数据类型。原创 2011-06-06 15:32:00 · 9428 阅读 · 0 评论