ON_EVENT(CChatDlg, IDC_TEXTCHAT1, 20 /* OnMyText */, OnOnMyTextTextchat1, VTS_BSTR)
IDC_TEXTCHAT1是什么控件?怎么导入进去?谢谢!!

解决方案 »

  1.   

    谁都知道是activex控件啊,具体是什么控件呢?
      

  2.   

    工程你都有
    自己找一下啊
    给个ID和消息链接让大家怎么猜
    到rc文件里搜搜看看对应关系
      

  3.   

    搜CChatDlg 看他的父类是什么
      

  4.   

    是通过textchat.h引用过来的,我把它贴出来
    #include "..\activex\textchat.h"
    CTextChat m_chat;class CTextChat : public CWnd
    {
    protected:
    DECLARE_DYNCREATE(CTextChat)
    public:
    //##ModelId=3C1854E20247
    CLSID const& GetClsid()
    {
    static CLSID const clsid
    = { 0x20c64290, 0x1416, 0x4fc1, { 0xac, 0xd5, 0xad, 0x35, 0x37, 0xa6, 0x97, 0xce } };
    return clsid;
    }
    //##ModelId=3C1854E20225
    virtual BOOL Create(LPCTSTR lpszClassName,
    LPCTSTR lpszWindowName, DWORD dwStyle,
    const RECT& rect,
    CWnd* pParentWnd, UINT nID,
    CCreateContext* pContext = NULL)
    { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); } //##ModelId=3C1854E20239
        BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle,
    const RECT& rect, CWnd* pParentWnd, UINT nID,
    CFile* pPersist = NULL, BOOL bStorage = FALSE,
    BSTR bstrLicKey = NULL)
    { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
    pPersist, bStorage, bstrLicKey); }// Attributes
    public:// Operations
    public:
    //##ModelId=3C1854E20211
    void ShowText(long LID, LPCTSTR Name, LPCTSTR content);
    //##ModelId=3C1854E201F4
    void GetMinMaxInfo(long* cx_min, long* cy_min, long* cx_max, long* cy_max);
    };
    cpp代码:
    IMPLEMENT_DYNCREATE(CTextChat, CWnd)/////////////////////////////////////////////////////////////////////////////
    // CTextChat properties/////////////////////////////////////////////////////////////////////////////
    // CTextChat operationsvoid CTextChat::ShowText(long LID, LPCTSTR Name, LPCTSTR content)
    {
    static BYTE parms[] =
    VTS_I4 VTS_BSTR VTS_BSTR;
    InvokeHelper(0x1, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
     LID, Name, content);
    }void CTextChat::GetMinMaxInfo(long* cx_min, long* cy_min, long* cx_max, long* cy_max)
    {
    static BYTE parms[] =
    VTS_PI4 VTS_PI4 VTS_PI4 VTS_PI4;
    InvokeHelper(0x100, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
     cx_min, cy_min, cx_max, cy_max);
    }