// DlgChrOutfit.cpp : implementation file // #include "stdafx.h" #include "worldcreator.h" #include "DlgChrOutfit.h" #include "misc.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CDlgChrOutfit dialog CDlgChrOutfit::CDlgChrOutfit(CWnd* pParent /*=NULL*/) : CDialog(CDlgChrOutfit::IDD, pParent) { //{{AFX_DATA_INIT(CDlgChrOutfit) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT m_pSheetChrOutfitSlot = NULL; } void CDlgChrOutfit::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDlgChrOutfit) DDX_Control(pDX, IDC_LISTSTATICSLOT, m_ctrlStaticSlotStatus); DDX_Control(pDX, IDC_LISTOUTFITSLOT, m_ctrlOutfitSlotStatus); DDX_Control(pDX, IDC_LISTATTACHMENTSLOT, m_ctrlAttachmentSlotStatus); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CDlgChrOutfit, CDialog) //{{AFX_MSG_MAP(CDlgChrOutfit) ON_WM_CLOSE() ON_WM_DESTROY() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CDlgChrOutfit message handlers void CDlgChrOutfit::OnClose() { // TODO: Add your message handler code here and/or call default // Alt + F4 °­Á¦ ¹«È¿È­ //CDialog::OnClose(); } BOOL CDlgChrOutfit::Create(CWnd* pParentWnd) { // TODO: Add your specialized code here and/or call the base class return CDialog::Create(IDD, pParentWnd); } BOOL CDlgChrOutfit::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here m_pSheetChrOutfitSlot = new CSheetChrOutfitSlot( "ChrOutfitSlot" ); m_pSheetChrOutfitSlot->EnableStackedTabs( FALSE ); m_pSheetChrOutfitSlot->Create( this, WS_CHILD | WS_VISIBLE ); m_pSheetChrOutfitSlot->ModifyStyleEx(0,WS_EX_CONTROLPARENT); m_pSheetChrOutfitSlot->ModifyStyle(0,WS_TABSTOP); m_pSheetChrOutfitSlot->MoveWindow( 270, 5, 250, 340 ); //m_pSheetChrOutfitSlot->SetWindowPos( NULL, 155, 7, 145, 218, SWP_NOZORDER | SWP_NOMOVE ); CTabCtrl * pTabCtrl = m_pSheetChrOutfitSlot->GetTabControl(); pTabCtrl->SetWindowPos( NULL, 0,0,245,340, SWP_NOZORDER | SWP_NOMOVE ); DWORD dwExtStyle; dwExtStyle = m_ctrlStaticSlotStatus.GetExtendedStyle(); dwExtStyle |= LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES; m_ctrlStaticSlotStatus.SetExtendedStyle( dwExtStyle ); m_ctrlStaticSlotStatus.InsertColumn( 0, "Slot", LVCFMT_LEFT, 100 ); m_ctrlStaticSlotStatus.InsertColumn( 1, "Set", LVCFMT_LEFT, 140 ); dwExtStyle = m_ctrlOutfitSlotStatus.GetExtendedStyle(); dwExtStyle |= LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES; m_ctrlOutfitSlotStatus.SetExtendedStyle( dwExtStyle ); m_ctrlOutfitSlotStatus.InsertColumn( 0, "Slot", LVCFMT_LEFT, 100 ); m_ctrlOutfitSlotStatus.InsertColumn( 1, "Set", LVCFMT_LEFT, 140 ); dwExtStyle = m_ctrlAttachmentSlotStatus.GetExtendedStyle(); dwExtStyle |= LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES; m_ctrlAttachmentSlotStatus.SetExtendedStyle( dwExtStyle ); m_ctrlAttachmentSlotStatus.InsertColumn( 0, "Slot", LVCFMT_LEFT, 100 ); m_ctrlAttachmentSlotStatus.InsertColumn( 1, "Set", LVCFMT_LEFT, 140 ); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CDlgChrOutfit::OnDestroy() { CDialog::OnDestroy(); // TODO: Add your message handler code here SAFE_DELETE( m_pSheetChrOutfitSlot ); }