Posts Tagged ‘ ATL

OnDraw, OnDrawAdvanced in CComCompositeControl ATL Controls

When derriving ActiveX controls from CComCompositeControl the virtual functions OnDraw() and OnDrawAdvanced() are not being called. A look at atlctl.h reveals that OnDraw is called from OnDrawAdvanced, which is in turn called from CComControlBase::OnPaint. The message handler for OnPaint, however, is declared in CComControl, and CComCompositeControl does not chain its message map to CComControl, so that WM_PAINT is never actually processed.

Read more

Drawing Bitmap Resources in ATL 7.0 Controls

This article is part of a backup. It was originally posted on Wednesday, May 23. 2007.

Introduction

The code samples in the following paragraphs assume that there exists a custom ATL 7.0 COM control called CMyControl, which is derrived from CComControl. Such a control can be created using the ATL Control wizzard in Visual Studio or – for advanced programmers – by manually writing the corresponding code.

Read more