Click here to Skip to main content
15,893,904 members
Articles / Desktop Programming / ATL

Docking ActiveX Controls: Principles and Implementation

Rate me:
Please Sign up or sign in to vote.
4.82/5 (7 votes)
28 Aug 200115 min read 183.8K   2.9K   82  
The article decribes how to implement docking ActiveX control using MFC and ATL
// stdafx.h : include file for standard system include files,
//      or project specific include files that are used frequently,
//      but are changed infrequently

#if !defined(AFX_STDAFX_H__B702FD25_94CC_11D3_B680_000000000000__INCLUDED_)
#define AFX_STDAFX_H__B702FD25_94CC_11D3_B680_000000000000__INCLUDED_

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

#pragma warning( disable : 4786 ) // disable compile warning for long > 255 strings

#define STRICT
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
#define _ATL_APARTMENT_THREADED

#include <afxwin.h>
#include <afxctl.h>         // MFC support for ActiveX Controls - needed for COleStreamFile
#include <afxext.h>         // MFC extensions
#include <afxdtctl.h>		// MFC support for Internet Explorer 4 Comon Controls
#include <afxtempl.h>		// MFC templates
#include <afxadv.h>
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>			// MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include <afxcoll.h>    // for CObArray
#include <..\src\afximpl.h> // for AfxDeleteObject

#define ATL_TRACE_LEVEL 4

#include <atlbase.h>
//You may derive a class from CComModule and use it if you want to override
//something, but do not change the name of _Module
extern CComModule _Module;

//--- These what makes MFC & ATL work together,
//--- name conflict resolution - ATL names redefinition. 
#define InternalAddRef IntATLAddRef
#define InternalRelease IntATLRelease
#define InternalQueryInterface IntATLQueryInterface
#define m_dwRef m_ATLdwRef
#define m_pOuterUnknown m_pATLOuterUnknown

#include <atlcom.h>
#include <atlctl.h>
#include <htmlhelp.h>       // HTML Help API

#define MAX_SIZE_NAME 64
#define CX_CONTROL_SPACE 0
#define CY_CONTROL_SPACE 1
#define CY_EDIT_CNTRL 10

typedef enum HFILETYPE {
    hVB = 0,
    vCPP = 1
} HFILETYPE;

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

#endif // !defined(AFX_STDAFX_H__B702FD25_94CC_11D3_B680_000000000000__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
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions