www.pudn.com > final_6.rar > ControlDialog.cpp
// ControlDialog.cpp : implementation file
//
#include "stdafx.h"
#include "CG.h"
#include "ControlDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CControlDialog dialog
CControlDialog::CControlDialog(CWnd* pParent /*=NULL*/)
: CDialogBar(/*CControlDialog::IDD, pParent*/)
{
//{{AFX_DATA_INIT(CControlDialog)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CControlDialog::DoDataExchange(CDataExchange* pDX)
{
CDialogBar::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CControlDialog)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CControlDialog, CDialogBar)
//{{AFX_MSG_MAP(CControlDialog)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BOOL CControlDialog::Create(CWnd* pParentWnd,UINT nIDTemplate,UINT nStyle,UINT nID)
{
// TODO: Add your specialized code here and/or call the base class
BOOL bRes= CDialogBar::Create(pParentWnd,nIDTemplate,nStyle,nID );
InitDialogBar();//在类中添加一个成员函数就可以了
return bRes;
}
BOOL CControlDialog::InitDialogBar()
{
UpdateData(FALSE);//这个一定要啊,这样就会有和CDialog一样的数据交换效果了
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CControlDialog message handlers