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)
{
}
'개발지식창고 > MFC' 카테고리의 다른 글
클립보드 사용법2 (0) | 2010.10.27 |
---|---|
클립보드 사용법 1 (0) | 2010.10.27 |
[MFC]현제 프로그램이 실행되고 있는 디렉토리 구하기 (0) | 2010.09.20 |
[소스] 테두리 없고, 크기 조절 가능하며, 움직일 수 있는 투명 다이얼로그 만들기 (0) | 2010.09.20 |
MFC 어플리케이션 함수 호출 순서 (0) | 2010.09.20 |