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

Docking CSizingControlBar objects inside ActiveX containers

Rate me:
Please Sign up or sign in to vote.
4.90/5 (17 votes)
14 Jun 20013 min read 176K   2.5K   72  
A solution that allows you to dock Cristi Posea's Docking Window class inside ActiveX controls.
// DockCtrlPpg.cpp : Implementation of the CDockCtrlPropPage property page class.

#include "stdafx.h"
#include "DockCtrl.h"
#include "DockCtrlPpg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


IMPLEMENT_DYNCREATE(CDockCtrlPropPage, COlePropertyPage)


/////////////////////////////////////////////////////////////////////////////
// Message map

BEGIN_MESSAGE_MAP(CDockCtrlPropPage, COlePropertyPage)
	//{{AFX_MSG_MAP(CDockCtrlPropPage)
	// NOTE - ClassWizard will add and remove message map entries
	//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// Initialize class factory and guid

IMPLEMENT_OLECREATE_EX(CDockCtrlPropPage, "DOCKCTRL.DockCtrlPropPage.1",
	0x18cb683, 0xff01, 0x4e1d, 0xba, 0x39, 0xc0, 0xc2, 0x63, 0x79, 0x71, 0xf8)


/////////////////////////////////////////////////////////////////////////////
// CDockCtrlPropPage::CDockCtrlPropPageFactory::UpdateRegistry -
// Adds or removes system registry entries for CDockCtrlPropPage

BOOL CDockCtrlPropPage::CDockCtrlPropPageFactory::UpdateRegistry(BOOL bRegister)
{
	if (bRegister)
		return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
			m_clsid, IDS_DOCKCTRL_PPG);
	else
		return AfxOleUnregisterClass(m_clsid, NULL);
}


/////////////////////////////////////////////////////////////////////////////
// CDockCtrlPropPage::CDockCtrlPropPage - Constructor

CDockCtrlPropPage::CDockCtrlPropPage() :
	COlePropertyPage(IDD, IDS_DOCKCTRL_PPG_CAPTION)
{
	//{{AFX_DATA_INIT(CDockCtrlPropPage)
	// NOTE: ClassWizard will add member initialization here
	//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_DATA_INIT
}


/////////////////////////////////////////////////////////////////////////////
// CDockCtrlPropPage::DoDataExchange - Moves data between page and properties

void CDockCtrlPropPage::DoDataExchange(CDataExchange* pDX)
{
	//{{AFX_DATA_MAP(CDockCtrlPropPage)
	// NOTE: ClassWizard will add DDP, DDX, and DDV calls here
	//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_DATA_MAP
	DDP_PostProcessing(pDX);
}


/////////////////////////////////////////////////////////////////////////////
// CDockCtrlPropPage message handlers

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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
Greg is a Microsoft Certified developer and runs Intelligent Systems, Inc, a consulting company specializing in user interface design and progamming in Visual C++.

Comments and Discussions