Click here to Skip to main content
15,896,726 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 176.2K   2.5K   72  
A solution that allows you to dock Cristi Posea's Docking Window class inside ActiveX controls.
// DockInActiveXCtrlDlg.h : header file
//
//{{AFX_INCLUDES()
#include "dockctrl.h"
//}}AFX_INCLUDES

#if !defined(AFX_DOCKINACTIVEXCTRLDLG_H__DC45A514_273E_4D58_BB67_89D837C514B1__INCLUDED_)
#define AFX_DOCKINACTIVEXCTRLDLG_H__DC45A514_273E_4D58_BB67_89D837C514B1__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CDockInActiveXCtrlDlg dialog

class CDockInActiveXCtrlDlg : public CDialog
{
// Construction
public:
	CDockInActiveXCtrlDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CDockInActiveXCtrlDlg)
	enum { IDD = IDD_DOCKINACTIVEXCTRL_DIALOG };
	CButton	    m_btnOK;
	CDockCtrl	m_DockCtrl;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDockInActiveXCtrlDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CDockInActiveXCtrlDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DOCKINACTIVEXCTRLDLG_H__DC45A514_273E_4D58_BB67_89D837C514B1__INCLUDED_)

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