// PointLightPanel.cpp : implementation file // #include "stdafx.h" #include "mw4gameed2.h" #include "PointLightPanel.h" #include "GUILight.h" ///////////////////////////////////////////////////////////////////////////// // CPointLightPanel dialog CPointLightPanel::CPointLightPanel(GUIPointLight *gobj,UndoCommand **cmd,CWnd* pParent) : CPanelDlg(CPointLightPanel::IDD, pParent) { MyObj=gobj; CmdLst=cmd; //{{AFX_DATA_INIT(CPointLightPanel) m_Inner = 0.0f; m_Outer = 0.0f; //}}AFX_DATA_INIT } void CPointLightPanel::DoDataExchange(CDataExchange* pDX) { CPanelDlg::DoDataExchange(pDX); //{{AFX_DATA_MAP(CPointLightPanel) DDX_Text(pDX, IDC_INNER, m_Inner); DDX_Text(pDX, IDC_OUTER, m_Outer); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CPointLightPanel, CPanelDlg) //{{AFX_MSG_MAP(CPointLightPanel) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CPointLightPanel message handlers void CPointLightPanel::OnOK() { UpdateData(TRUE); MyObj->SetInnerRad(m_Inner); MyObj->SetOuterRad(m_Outer); //CPanelDlg::OnOK(); } void CPointLightPanel::OnCancel() { //CPanelDlg::OnOK(); } BOOL CPointLightPanel::OnInitDialog() { CPanelDlg::OnInitDialog(); m_Inner=MyObj->GetInnerRad(); m_Outer=MyObj->GetOuterRad(); // TODO: Add extra initialization here UpdateData(FALSE); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }