问题描述
我不了解Dialog类中的构造函数(自动生成),为什么cWnd指针正在传递以及CDialog的作用是什么(cApp :: IDD,pParent)。我是vc ++的新手,可以请任何人详细告诉我(为什么这行包括CDialog(cApp :: IDD,pParent))
我是什么尝试过:
我在vc ++ 6.0中创建了一个Dialog,它的构造函数如下所示
cApp :: cApp(cWnd * pParent)
:CDialog(cApp :: IDD,pParent)
{
//有些初始化是
}
I didn't understand constructor(Auto generated)in Dialog class,why cWnd pointer is passing and what's the role of CDialog(cApp::IDD,pParent). I am new to vc++,can any one please tell me elaborately(why this line is included CDialog(cApp::IDD,pParent))
What I have tried:
I created one Dialog in vc++ 6.0,it's constructor like as follows
cApp::cApp(cWnd *pParent)
:CDialog(cApp::IDD,pParent)
{
//some initializations are there
}
推荐答案
这篇关于在vc ++ 6.0中基于对话框的应用程序的构造函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!