• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            鐵觀音

            C++編程寶典

               ::  ::  ::  ::  :: 管理 ::
              1 隨筆 :: 19 文章 :: 0 評論 :: 0 Trackbacks

            Introduction

            The ZSplitterDlg and ZSplitter classes help you to add splitters to your dialog, property sheet or any other window. It splits your controls and makes them movable and resizeable. I think this way is better than "auto size" contol: it adds a "docking" opportunity. Moreover, one more control added that add "auto size" option. Finally, you can integrate the ZSplitterDlg with a resizable dialog (for example CResizableDialog by Paolo Messina).

            Note that you shouldn't add anything to your resources and shouldn't describe the relations between controls. Just make the corresponding size and position of your controls and use the functions:

            				void addControls(int count, bool connectVertical, ...);
            void addControl(int id);
            

            Demo project shows using these automatically added controls in CDialog, CPropertyPage, CView and CFormView classes.

            Sample Image

            Using the class

            The simplest way is to use the ZSplitterDlgImpl template. You should change:

            • The parent of your dialog ot view class,
            • the constructor implementation,
            • the second parameter in BEGIN_MESSAGE_MAP macros, and
            • the "on init" function of your window.
            				// in header
            				class CTestDlg1 : public ZSplitterDlgImpl<CPropertyPage>
            
            // in source
            CTestDlg1::CTestDlg1() : /*...*/ ZSplitterDlgImpl<CPropertyPage>(CTestDlg1::IDD) {}
            
            BEGIN_MESSAGE_MAP(CTestDlg1, ZSplitterDlgImpl<CPropertyPage>)
            	//	...
            END_MESSAGE_MAP()
            
            BOOL CTestDlg1::OnInitDialog() 
            {
            	// ... and use addControl(s) function here
            	init();
            	// ...
            }
            

            The ZSplitterDlgImpl template has a second parameter (ZSplitter2 by default). ZSplitter2 is the implementation of a spliter control. It has a virtual function OnPaint() - and you can change it's realisation to have different view of your control (see CMyView1 class in demo project).

            The ZSplitterDlgImpl template helps you to implement splitter controls but you can use its base ZSplitterDlg class (look for CTestDlg2 class) in demo project.

            I remade a little CResizableDialog with the permission of the author and you can use it with my splitters: use the ZSplitterDlgResizable class for this job. (look for CDemoDlg class) in the demo project.

            resizable sample

            This is a sample of your dialog in resource editor:

            in vc++ editor

            And user can change it in such way in runtime.

            after user manipulations

            You should use the addControls or addControl functions to add one control to the "splitter set" or a group of controls: they will move together. This is an example which you seen above

              addControls(2,false,IDC_LIST6,IDC_LIST7);
              addControls(2,true,IDC_LIST1,IDC_LIST8);
              addControl(IDC_LIST9);
              addControl(IDC_LIST2);
              addControl(IDC_LIST3);
              addControl(IDC_LIST4);
              addControl(IDC_LIST5);
            

            Moreover you can manually add a ZSplitter class (the most common splitter controls) to a page. Look at the images and in the CTestDlg3 class of the demo project for details.

            before moving after moving

            To Do list

            I'd like to make the look (color, size, effects) of the splitter more presentable. So I want to get comments from you. First of all: is this technique useful to you?

            Note

            Make sure to check out the my web site which is more likely to have updates and betas:
            http://www.zmike.net

            About Mike Melnikov


            Mike has been programming in C/C++ for 11 years and Visual C++/MFC for 4 years. His background includes pure and applied mathematics, engineering and physics, and he is currently based in Moscow, Russia.

            Click here to view Mike Melnikov's online profile.

            posted on 2006-10-14 10:44 鐵觀音 閱讀(302) 評論(0)  編輯 收藏 引用 所屬分類: VC界面控件類
            久久天天躁狠狠躁夜夜96流白浆 | 亚洲国产精品婷婷久久| 久久99精品国产自在现线小黄鸭| 久久精品无码专区免费东京热| 国内精品人妻无码久久久影院 | 亚洲国产精品久久久天堂| 国内精品久久久久影院日本 | 亚洲欧美日韩久久精品第一区| 69久久夜色精品国产69| 久久精品国产精品亚洲下载| 久久热这里只有精品在线观看| 91精品国产色综久久| 亚洲中文字幕无码久久2020| 精品99久久aaa一级毛片| 亚洲AV无码久久寂寞少妇| 狠狠色综合网站久久久久久久| 久久久久久无码Av成人影院| 欧美亚洲另类久久综合婷婷| 久久99国产精品久久| 无码精品久久久天天影视| 久久av高潮av无码av喷吹| 久久国产色AV免费观看| 国产激情久久久久久熟女老人 | 久久人人爽人人人人爽AV| 久久久久久一区国产精品| 色综合久久天天综合| 久久国产热精品波多野结衣AV| 久久婷婷色香五月综合激情| 久久国产影院| 精品国产婷婷久久久| 91精品国产91久久久久久青草| 丰满少妇人妻久久久久久 | 精品久久久无码中文字幕天天| 国产成人久久精品一区二区三区| 97精品依人久久久大香线蕉97| 久久天天婷婷五月俺也去| 久久笫一福利免费导航| 亚洲国产成人久久综合区| 日韩欧美亚洲国产精品字幕久久久 | 99久久国产综合精品成人影院| 99久久精品免费看国产免费|