Click here to Skip to main content
15,886,110 members
Articles / Desktop Programming / MFC

ZSplitter: Adding Automatic Splitting for Dialog Controls

Rate me:
Please Sign up or sign in to vote.
4.88/5 (14 votes)
28 May 2001 633.2K   6.4K   58  
A set of classes that provide automatic adding necessary splitters in your dialogs
// ZSplitterDlgEx.h
// Designed by Mike Melnikov 

#ifndef _NestorSplitterDlgEx_h_
#define _NestorSplitterDlgEx_h_

#include "ZSplitterDlg.h"

#include "ResizableDialog.h"

class ZSplitterDlgResizable : public ZSplitterDlgImpl<CResizableDialog>
{
 protected:
	ZSplitterDlgResizable()
    : inherited() {}
	ZSplitterDlgResizable(UINT nIDTemplate, CWnd* pParentWnd = NULL)
    : inherited(nIDTemplate,pParentWnd){}
  ZSplitterDlgResizable(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL) 
    : inherited(lpszTemplateName,pParentWnd) {}

  void ArrangeLayout()
  {
    inherited::ArrangeLayout();
    reinit();
  }

  LONG OnMoveElement(UINT , LONG awnd)
  {
    HWND wnd = (HWND)awnd;
    ReAddAnchor(wnd);
    return 0;
  }

  DECLARE_MESSAGE_MAP()
  typedef ZSplitterDlgImpl<CResizableDialog> inherited;
};



#endif // _NestorSplitterDlgEx_h_

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


Written By
Web Developer
Russian Federation Russian Federation
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.

Comments and Discussions