首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

怎么让窗口过程函数包含在类中

2012-03-27 
如何让窗口过程函数包含在类中?部分代码public:WNDCLASSEXW mfLRESULT __stdcall MainProc(HWND,UINT,WPA

如何让窗口过程函数包含在类中?
部分代码
public:
  WNDCLASSEXW mf;
LRESULT __stdcall MainProc(HWND,UINT,WPARAM,LPARAM);
---------------------------
this->mf.lpfnWndProc = &MainWindow::MainProc; 报错
this->mf.lpfnWndProc = &this->MainProc; 报错
this->mf.lpfnWndProc = mw + &MainWindow::MainProc;(mw是这个类的一个实例指针)报错
this->mf.lpfnWndProc = mw + &this->MainProc; 报错

如果
static LRESULT __stdcall MainProc(HWND,UINT,WPARAM,LPARAM);
就对了,那么怎么在不加static的基础上完成呢?MFC是如何完成的?

[解决办法]
你搜索Thunk学习一下

热点排行