我是想用MFC ActiveX ControlWizard制作Target.ocx或Target.dll,这个东西最后要用ASP插入到网页中,假如我要的CMyListCtrl与原来CListCtrl实现完全一样的功能,是不是必须要从头来过啊?!能不能通过继承而利用原有的东西啊?还有一个具体问题在MFC ActiveX ControlWizard建立的工程下,我要用ClassWizard为控件增加一个属性,并且同时加入Get/Set函数。
如果这个属性的类型在ClassWizard所提供的数据类型下拉列表框中(大概有24种)不存在,怎么办?
如果Get/Set函数的返回值或参数的类型也找不到怎么办?
比如
class CListCtrl : public CWnd
{
……
CImageList* GetImageList(int nImageList) const;
CImageList* SetImageList(CImageList* pImageList, int nImageListType);
……
}
这两个函数怎么实现?请各位多给建议,先行谢过。
如果这个属性的类型在ClassWizard所提供的数据类型下拉列表框中(大概有24种)不存在,怎么办?
如果Get/Set函数的返回值或参数的类型也找不到怎么办?
比如
class CListCtrl : public CWnd
{
……
CImageList* GetImageList(int nImageList) const;
CImageList* SetImageList(CImageList* pImageList, int nImageListType);
……
}
这两个函数怎么实现?请各位多给建议,先行谢过。
http://www.codeguru.com/activex/dialogctrl.shtml
2. you can deal with by hand ,not use classwinzard.
不过我没式过。
CMyListCtrl:public COleControl
{
......
CListCtrl* GetListCtrl(){return (CListCtrl*)this;}
Command what is yours
Conquer what is not