日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

SDI中的窗口切分

系統(tǒng) 2280 0
一、主要函數(shù)
(1)CSplitterWnd::CreateStatic

To create a static splitter window, call the CreateStatic member function.

            virtual BOOL CreateStatic(   CWnd* pParentWnd,   int nRows,   int nCols,   DWORD dwStyle = WS_CHILD | WS_VISIBLE,   UINT nID = AFX_IDW_PANE_FIRST );
          

Parameters

pParentWnd

The parent frame window of the splitter window.

nRows

The number of rows. This value must not exceed 16.

nCols

The number of columns. This value must not exceed 16.

dwStyle

Specifies the window style.

nID

The child window ID of the window. The ID can be AFX_IDW_PANE_FIRST unless the splitter window is nestedinside another splitter window.

(2)CSplitterWnd::CreateView

Creates the panes for a static splitter window.

                virtual BOOL CreateView(   int row,   int col,   CRuntimeClass* pViewClass,   SIZE sizeInit,   CCreateContext* pContext );
              

Parameters

row

Specifies the splitter window row in which to place the newview.

col

Specifies the splitter window column in which to place the newview.

pViewClass

Specifies the CRuntimeClass of the new view.

sizeInit

Specifies the initial size of the new view.

pContext

A pointer to a creation context used to create the view (usuallythe pContext passed into the parentframe's overridden CFrameWnd::OnCreateClient member function in which the splitter window is being created).

ReturnValue

Nonzero if successful; otherwise 0.

Remarks

All panes of a static splitter window must be created before theframework displays the splitter.

The framework also calls this member function to create newpanes when the user of a dynamic splitter window splits a pane,row, or column.

Example
                  
                    二、(1)OnCreateClient繪制與文檔對(duì)象和邊框窗口對(duì)象相聯(lián)系的視區(qū)。
                  
                    (2)在單個(gè)視類的切分窗口中,各個(gè)視區(qū)的內(nèi)容是完全一致的,只要一個(gè)視類對(duì)象
                  
                    (3)切分窗口為多視類則,不同的切分窗口可以顯示不同的內(nèi)容,因此要?jiǎng)?chuàng)建多個(gè)視類對(duì)象。
                  
                    三、代碼:
                  
                    (1)聲明切分窗口(可能要)
                  
                    CChildFrame類中加入 CSpliterWnd m_wndSplitter
                  
                    (2)在OnCreateClient加入代碼
                  
                    // this function creates the panes for a static splitter windowBOOL CChildFrame::OnCreateClient( LPCREATESTRUCT lpcs,    CCreateContext* pContext){   BOOL bCreateSpltr = m_wndSplitter.CreateStatic( this, 2, 1);   // COneView and CAnotherView are user-defined views derived from CMDIView   m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(COneView), CSize(0,0),       pContext);   m_wndSplitter.CreateView(1,0,RUNTIME_CLASS(CAnotherView), CSize(0,0),       pContext);   return (bCreateSpltr);}
                  

SDI中的窗口切分


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對(duì)您有幫助就好】

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長(zhǎng)會(huì)非常 感謝您的哦!!!

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論
主站蜘蛛池模板: 诏安县| 郎溪县| 三门峡市| 西林县| 高台县| 大同市| 师宗县| 页游| 淳化县| 新乐市| 新余市| 博罗县| 桓仁| 冕宁县| 全椒县| 康保县| 海林市| 寻乌县| 栾城县| 启东市| 科技| 广元市| 德化县| 鄯善县| 泽普县| 寻甸| 阿勒泰市| 浏阳市| 外汇| 咸阳市| 沾化县| 洪江市| 锡林浩特市| 新竹县| 金寨县| 华安县| 保康县| 玉田县| 库车县| 麻城市| 乌兰察布市|