whisht

    十年

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

I wanted to create a control which would behave as a dialog or formview (you can place controls here). There is a simple way to do it - to take advantage of ActiveX.

  1. Create a new MFC ActiveX ControlWizard workspace (no need to special options).
  2. Insert a new dialog resource named IDC_MYDIALOG (check following: style - child, border - dialog frame, visible, control, static edge)
  3. Insert a new MFC class named CMyDialog (base class CDialog)
  4. Add CMyDialog m_MyDialog member to your CDialogCtrl header source (don't forget to add#include "MyDialog.h")
  5. Using classwizard add a member function OnCreate (WM_CREATE)

Modify the member function OnDraw (the dialog's size depends on the WIDTH and HEIGHT specified in the HTML file):


posted on 2012-01-11 10:23  WHISHT  阅读(747)  评论(0编辑  收藏  举报