用函数作为参数传的的问题。
有一函数定义如下:
void Drawf(CDC* pDC,CPrintInfo* pInfo,void* pVoid)
{
((CDlgPreprintDlg*)pVoid)->OnPrint(pDC,pInfo);
}
函数OnPrint定义如下:
void CDlgPreprintDlg::OnPrint(CDC* pDC,CPrintInfo* pInfo)
{
pDC->DrawText(ss,&rect,DT_CENTER|DT_TOP|DT_SINGLELINE);
。。。。。。
}
这样调用Drawf:
m_PreFrame = new CMainFrame(Drawf,this,this,TRUE);
问题:1。函数Drawf无返回值怎样作为参数传递呢?
2。函数参数的值怎样确定的呢?
3。void* pVoid这是怎么回事?