int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; // 프레임의 클라이언트 영역을 차지하는 뷰를 만듭니다. if (!m_wndView.Create(NULL, NULL, AFX_WS_DEFAULT_VIEW, CRect(0, 0, 0, 0), this, AFX_IDW_PANE_FIRST, NULL)) { TRACE0("뷰 창을 만들지 못했습니다.\n"); return -1; } if (!m_wndStatusBar.Create(this)) { TRACE0("상태 표시줄을 만들지 못했습니다.\n"); return -1; // 만들지 못했습니다. } m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT)); //deep02 : 뷰 윈도우 위에 다른 뷰 윈도우를 생성하기. m_wndView2.Create(TEXT("Static"),TEXT("DEMO"), WS_CHILD |WS_VISIBLE|WS_BORDER, CRect(5, 5, 100, 100), this,1); //deep01 : 레지스트리에 저장한 윈도우 크기, 위치보관 CWinApp* pApp = (CWinApp*)AfxGetApp(); CRect rect; GetWindowRect(rect); rect.left = pApp->GetProfileIntA(m_Section,"left", rect.left); rect.top = pApp->GetProfileIntA(m_Section, "top", rect.top); rect.right = pApp->GetProfileIntA(m_Section, "right", rect.right); rect.bottom = pApp->GetProfileIntA(m_Section, "bottom", rect.bottom); MoveWindow(rect); return 0; }