How To Write a Dialog-based ActiveX Control Using ATL (175503)
The information in this article applies to:
- The Microsoft Active Template Library (ATL) 2.0
- The Microsoft Active Template Library (ATL) 2.1
- The Microsoft Active Template Library (ATL) 3.0
This article was previously published under Q175503 SUMMARY
When writing ActiveX controls with the Active Template Library (ATL), it
may be useful to create your control based on a dialog box template. This
allows you to take advantage of the Visual C++ resource editor to lay out
contained controls or to reuse existing MFC dialog box templates and Visual
Basic forms.
You add an ActiveX control to your ATL project by clicking New ATL Object
on the Insert menu, and then clicking either Full Control or Internet
Explorer Control. On completion, the ATL Object Wizard generates code that
includes a class derived from CComControl, which further derives from
CWindowImpl.
This article demonstrates how to derive your control class from CDialogImpl
and associate a dialog box template with this class. This article also
demonstrates providing support for UI activation and navigation keys.
Modification Type: | Minor | Last Reviewed: | 7/15/2004 |
---|
Keywords: | kbCtrlCreate kbDlg kbhowto KB175503 |
---|
|