BOOL CSalePriceDlgAutoPartsWareHouse::OnInitDialog()
{
 CDialog::OnInitDialog();

 CMenu* pSysMenu = GetSystemMenu(FALSE);
 if (pSysMenu != NULL)
 {
  CString strAboutMenu;
  //  strAboutMenu.LoadString(IDS_ABOUTBOX);
  if (!strAboutMenu.IsEmpty())
  {
   pSysMenu->AppendMenu(MF_SEPARATOR);
   //   pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
  }
 }

 // Set the icon for this dialog.  The framework does this automatically
 //  when the application's main window is not a dialog
 SetIcon(m_hIcon, TRUE);   // Set big icon
 SetIcon(m_hIcon, FALSE);  // Set small icon

 BOOL ret;
 CRect rect;
 CWnd* pHolder = GetDlgItem( IDC_SUBPAGEAREA ); // IDC_SUBPAGEAREA 픽처컨트롤 ID
 pHolder->GetWindowRect( &rect );
 ScreenToClient( &rect );

 ret = m_DlgSubPage1.Create( IDD_SUB_PAGE1, this );
 ret = m_DlgSubPage1.ShowWindow( WS_VISIBLE|WS_CHILD );
 ret = m_DlgSubPage1.SetWindowPos( pHolder, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, SWP_SHOWWINDOW );


 ret = m_DlgSubPage2.Create( IDD_SUB_PAGE2, this );
 ret = m_DlgSubPage2.ShowWindow( WS_VISIBLE|WS_CHILD );
 ret = m_DlgSubPage2.SetWindowPos( pHolder, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, SWP_SHOWWINDOW );

 ret = m_DlgSubPage3.Create( IDD_SUB_PAGE3, this );
 ret = m_DlgSubPage3.ShowWindow( WS_VISIBLE|WS_CHILD );
 ret = m_DlgSubPage3.SetWindowPos( pHolder, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, SWP_HIDEWINDOW );
 
 m_DlgSubPage1.ShowWindow(SW_HIDE);
 m_DlgSubPage2.ShowWindow(SW_HIDE);
 m_DlgSubPage3.ShowWindow(SW_SHOW);
 return TRUE;
}

=======================================================================================================
#pragma once

class CSalePriceDlgAutoPartsWareHouse_SubPage2 :
 public CDialog
{
 DECLARE_DYNAMIC(CSalePriceDlgAutoPartsWareHouse_SubPage2)
public:
 CSalePriceDlgAutoPartsWareHouse_SubPage2(void);
 virtual ~CSalePriceDlgAutoPartsWareHouse_SubPage2(void);
 enum { IDD = IDD_SUB_PAGE2};
};
=====================================================================================
#include "StdAfx.h"
#include "SalePriceDlgAutoPartsWareHouse_SubPage2.h"

IMPLEMENT_DYNAMIC(CSalePriceDlgAutoPartsWareHouse_SubPage2, CDialog)
CSalePriceDlgAutoPartsWareHouse_SubPage2::CSalePriceDlgAutoPartsWareHouse_SubPage2(void)
:CDialog(CSalePriceDlgAutoPartsWareHouse_SubPage2::IDD)
{
}

CSalePriceDlgAutoPartsWareHouse_SubPage2::~CSalePriceDlgAutoPartsWareHouse_SubPage2(void)
{
}

Posted by 모과이IT
,