欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來(lái)到入門(mén)教程網(wǎng)!

C語(yǔ)言

當(dāng)前位置:主頁(yè) > 軟件編程 > C語(yǔ)言 >

VC實(shí)現(xiàn)對(duì)話框窗口任意分割

來(lái)源:本站原創(chuàng)|時(shí)間:2020-01-10|欄目:C語(yǔ)言|點(diǎn)擊: 次

    個(gè)人認(rèn)為簡(jiǎn)單問(wèn)題最好就是直接貼源代碼,一看就明白,說(shuō)來(lái)說(shuō)去反而弄不清楚,那我就少?gòu)U話了,自己看吧,注釋很清楚。

先來(lái)張圖片

1. 新建一個(gè)MFC對(duì)話框程序MySplitterDlg。 再插入兩個(gè)Dialog資源 ,這里一定要選擇IDD_FORMVIEW類別的對(duì)話框,分別新建類CMyFormView0 和CMyFormView1,基類別選CDialog,一定要選擇CFormView。

2. CMySplitterDlg中增加WM_CREATE的消息響應(yīng),編輯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.
  //需要注冊(cè)窗口類
  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;
}

上一篇:C++ 關(guān)于MFC List Control 控件的總結(jié)

欄    目:C語(yǔ)言

下一篇:C語(yǔ)言連接并操作Sedna XML數(shù)據(jù)庫(kù)的方法

本文標(biāo)題:VC實(shí)現(xiàn)對(duì)話框窗口任意分割

本文地址:http://mengdiqiu.com.cn/a1/Cyuyan/3035.html

網(wǎng)頁(yè)制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語(yǔ)言數(shù)據(jù)庫(kù)服務(wù)器

如果侵犯了您的權(quán)利,請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)進(jìn)行處理、任何非本站因素導(dǎo)致的法律后果,本站均不負(fù)任何責(zé)任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有