1。include相关的头文件
2。//{{AFX_DATA(CHttpBotDlg)
      enum { IDD = IDD_HTTPBOT_DLG };
      mystruct m_tList;
   //}}AFX_DATA
3。CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CHttpBotDlg)
DDX_Control(pDX, IDC_TASK_LIST, m_tList);
         //}}AFX_DATA_MAP

解决方案 »

  1.   

    1。include相关的头文件
    2。//{{AFX_DATA(CHttpBotDlg)
          enum { IDD = IDD_HTTPBOT_DLG };
          mystruct m_tList;
       //}}AFX_DATA
    3。CDialog::DoDataExchange(pDX);
    //{{AFX_DATA_MAP(CHttpBotDlg)
    DDX_Control(pDX, IDC_TASK_LIST, m_tList);
             //}}AFX_DATA_MAP
      

  2.   

    在那个文件里改?xxppg.cpp里吗??
    请这位大哥说得详细一点,我对VC不太熟,以前都是用bcb的。
    在线等候。
    如果解决问题,可以加倍给分。
      

  3.   

    it is recommended that use dispatch pointers for complex attributes.
      

  4.   

    To add the Position property From the View menu, click ClassWizard.
    Click the Automation tab.
    In the Class name box, select CAutoClickDoc if it is not already selected, and click Add Property.
    The Add Property dialog box appears,In the External name box, type Position.
    In the Type box, select LPDISPATCH.
    Under Implementation, click Get/Set methods.
    Click OK.
    This returns you to the Automation tab. The new Position property is implemented with stub Get and Set member functions. The Implementation box shows:LPDISPATCH GetPosition();
    void SetPosition(LPDISPATCH newValue);At this point, you would normally click the Edit Code button to implement the Get and Set methods. However, you’ll do that in Step 3 of the tutorial. For now, this stub property makes it possible to run Autodriv and test the code you added in Step 2.
      

  5.   

    Creating a New CCmdTarget Class with a Dispatch Interface
    Using ClassWizard is a simple way to derive a new class from CCmdTarget that implements a new dispatch interface.To create a new CCmdTarget class with a dispatch interface From the View menu, click ClassWizard.
    Click Add Class and from the menu click New.
    The New Class dialog box appears.Under Class information, in the Name box, type CAutoClickPoint.
    From the Base class drop-down list box, select CCmdTarget.
    Notice that all Automation options are now available because these options pertain only to CCmdTarget-derived classes.Select the Automation option.
    Click OK.
    You are returned to the ClassWizard dialog box.Click the Automation tab and ensure that CAutoClickPoint is selected in the Class name box.
    Click the Add Property button and fill in the Add Property dialog box:
    In the External name box, Type x.
    In the Type box, select short. 
    Accept m_x as the Variable name.
    Remove OnXChanged as the Notification function.
    As you will see later, the members of the CAutoClickPoint dispatch interface class do not need notification functions.Use the default Implementation type, Member variable. 
    Click OK.
    Repeat steps 8 and 9 for the y property.
    Click OK. 
    Study the CAutoClickPoint class created by ClassWizard in AutoClickPoint.h and AutoClickPoint.cpp. Toward the end of AutoClickPoint.h, you’ll find the declaration for the dispatch map:DECLARE_DISPATCH_MAP()The AutoClickPoint.cpp file implements the dispatch map, reflecting the two properties you added in ClassWizard, x and y.Tip   To jump to the implementation file, from ClassView, right-click any of the members of CAutoClickPoint, and click Go to Definition. BEGIN_DISPATCH_MAP(CAutoClickPoint, CCmdTarget)
       //{{AFX_DISPATCH_MAP(CAutoClickPoint)
       DISP_PROPERTY(CAutoClickPoint, "x", m_x, VT_I2)
       DISP_PROPERTY(CAutoClickPoint, "y", m_y, VT_I2)
       //}}AFX_DISPATCH_MAP
    END_DISPATCH_MAP()
      

  6.   

    我想用自己定义的数据结构来定义 control的属性和输入参数。至于一般的成员变量的类型,我知道如何改。
    希望能详细谈一下如何用自定义的数据类型来定义 控件的属性和事件的入参
      

  7.   

    请大家踊跃发言,任何有建议的想法都可以提出来讨论一下子。
    我认为这个问题对于开发activex的编程者肯定早晚是要遇到的。。大家up呀!
      

  8.   

    UP 就有分。。
    欢迎您:eroswzg
    专家分:405
    可用分:4990
    希望大家踊跃发言