首页 > Wiz, Wiz二次开发 > WizKnowledge 的ActiveX控件:IWizDocumentListCtrl_3

WizKnowledge 的ActiveX控件:IWizDocumentListCtrl_3


IWizDocumentAttachmentListCtrl是WizKMControls.dll所包含的一个ActiveX控件,利用这个控件,可以显示WizKnowledge的文档列表,以便用户选择一个或者多个WizKnowledge文档。同时,这个控件还包含了各种用户操作,用户通过右键菜单,可以实现多种操作。

 
您可以在网页里面直接使用这个控件,也可以在其它的高级语言里面使用,例如C++,VB,C#,Delphi等等。
 
  • ProgID:WizKMControls.WizDocumentAttachmentListCtrl
  • 文件:WizKMControls.dll
  •  

    [
        object,
        uuid(39B2717D-7FDA-4EDD-91A4-0173FD35B871),
        dual,
        nonextensible,
        helpstring("IWizDocumentAttachmentListCtrl Interface"),
        pointer_default(unique)
    ]
    interface IWizDocumentAttachmentListCtrl : IDispatch{

        //获得/设置数据库对象,类型为IWizDatabase
        [propget, id(1), helpstring("property Database")] HRESULT Database([out, retval] IDispatch** pVal);
        [propput, id(1), helpstring("property Database")] HRESULT Database([in] IDispatch* newVal);

        //获得/设置附件列表所属的文档对象,类型为IWizDocument
        [propget, id(2), helpstring("property Document")] HRESULT Document([out, retval] IDispatch** pVal);
        [propput, id(2), helpstring("property Document")] HRESULT Document([in] IDispatch* newVal);

        //获得/设置用户选中的附件对象,类型为IWizDocumentAttachmentCollection
        [propget, id(3), helpstring("property SelectedAttachments")] HRESULT SelectedAttachments([out, retval] IDispatch** pVal);
        [propput, id(3), helpstring("property SelectedAttachments")] HRESULT SelectedAttachments([in] IDispatch* newVal);

        //获得/设置是否显示边框
        [propget, id(4), helpstring("property Border")] HRESULT Border([out, retval] VARIANT_BOOL* pVal);
        [propput, id(4), helpstring("property Border")] HRESULT Border([in] VARIANT_BOOL newVal);

        //获得/设置是否显示阴影
        [propget, id(5), helpstring("property Shadow")] HRESULT Shadow([out, retval] VARIANT_BOOL* pVal);
        [propput, id(5), helpstring("property Shadow")] HRESULT Shadow([in] VARIANT_BOOL newVal);

        //获得/设置用户选中的文档更改的事件,提供给html+JavaScript使用这个事件
        [propget, id(6), helpstring("property OnSelChanged")] HRESULT OnSelChanged([out, retval] VARIANT* pVal);
        [propput, id(6), helpstring("property OnSelChanged")] HRESULT OnSelChanged([in] VARIANT newVal);

        //获得/设置用户双击一个文档的事件,提供给html+JavaScript使用这个事件
        [propget, id(7), helpstring("property OnDblClickItem")] HRESULT OnDblClickItem([out, retval] VARIANT* pVal);
        [propput, id(7), helpstring("property OnDblClickItem")] HRESULT OnDblClickItem([in] VARIANT newVal);

        //获得/设置用户选中一个右键菜单的事件,提供给html+JavaScript使用这个事件
        [propget, id(8), helpstring("property OnExecCommand")] HRESULT OnExecCommand([out, retval] VARIANT* pVal);
        [propput, id(8), helpstring("property OnExecCommand")] HRESULT OnExecCommand([in] VARIANT newVal);

        //执行添加附件命令。
        [id(9), helpstring("method AddAttachments")] HRESULT AddAttachments(void);
    };

     

    IWizDocumentAttachmentListCtrl对象的事件,高级语言可以响应这些事件。在C#,Delphi之类的语言中,可以直接响应下面的事件。
     
     
        [
            uuid(B752B564-DA68-4F9F-894F-556F641C4FCE),
            helpstring("_IWizDocumentAttachmentListCtrlEvents Interface")
        ]
        dispinterface _IWizDocumentAttachmentListCtrlEvents
        {
            properties:
            methods:

                //用户更改了选中的附件
                [id(1), helpstring("method SelChanged")] HRESULT SelChanged(void);

                //用户双击了某一个附件
                [id(2), helpstring("method DblClickItem")] HRESULT DblClickItem([in] IDispatch* pDocumentDisp);

                //用户选择了某一个菜单命令
                [id(11), helpstring("method ExecCommand")] HRESULT ExecCommand([in] BSTR bstrCommandName, [in] IDispatch* pDocumentDisp);
        };


    分类: Wiz, Wiz二次开发 标签:
    1. 本文目前尚无任何评论.
    1. 本文目前尚无任何 trackbacks 和 pingbacks.

    Spam Protection by WP-SpamFree