C++ VC???????????????
???????????? ???????[ 2015/6/24 14:05:05 ] ??????????????? ???????
??????дMFC???????????????????????????????????????????????????????鷳?????????????????????д????????????
???????????????????????????????????????????????ū???????????????????????????????????
????????????
????1. ??????MFC????????MySplitterDlg?? ?????????Dialog??? ?????????????IDD_FORMVIEW????????????????CMyFormView0 ??CMyFormView1????????CDialog?????????CFormView??
????2. CMySplitterDlg??????WM_CREATE????????????OnCreate()
int CMySplitterDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialog::OnCreate(lpCreateStruct) == -1)
return -1;
// Because the CFRameWnd needs a window class?? we will create a new one. I just copied the sample from MSDN Help.
// When using it in your project?? you may keep CS_VREDRAW and CS_HREDRAW and then throw the other three parameters.
//??????????
CString strMyClass = AfxRegisterWndClass(CS_VREDRAW | CS_HREDRAW??
::LoadCursor(NULL?? IDC_ARROW)?? (HBRUSH) ::GetStockObject(WHITE_BRUSH)??
::LoadIcon(NULL?? IDI_APPLICATION));
// Create the frame window with "this" as the parent
m_pMyFrame = new CFrameWnd;
m_pMyFrame->Create(strMyClass??""?? WS_CHILD?? CRect(0??0??300??300)?? this);
m_pMyFrame->ShowWindow(SW_SHOW);
// and finally?? create the splitter with the frame as the parent
m_cSplitter.CreateStatic(m_pMyFrame??1?? 2); //??Frame???з?????????1×2???????????
m_cSplitter.CreateView(0??0?? RUNTIME_CLASS(CMyFormView0)?? CSize(100??100)?? NULL);//????????
m_cSplitter.CreateView(0??1?? RUNTIME_CLASS(CMyFormView1)?? CSize(100??100)?? NULL);//????ж???
return 0;
}
????3. ??CMySplitterDlg::OnInitDialog()?????Frame
????int CMySplitterDlg::OnInitDialog()
????{
????CDialog::OnInitDialog();
????GetWindowRect(&cRect);
????ScreenToClient(&cRect);
????m_pMyFrame->MoveWindow(&cRect);
????m_pMyFrame->ShowWindow(SW_SHOW);
????return TRUE;
????}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11