如何在自己的程序中加入宏的功能[6]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 zswzwy 的 blog

9、在cmydialog.h中增加头文件:

#include <activscp.h>

#include "myscriptobject.h"

 

10、在onok()这前加入如下代码:

class myactivescriptsite : public iactivescriptsite {

private:

   ulong m_dwref; // reference count

public:

   iunknown *m_punkscriptobject; // pointer to your object that is exposed

                                 // to the script engine in getiteminfo().

  

   myactivescriptsite::myactivescriptsite() {m_dwref = 1;}

   myactivescriptsite::~myactivescriptsite() {}

  

   virtual hresult _stdcall queryinterface(refiid riid, void **ppvobject) {

      *ppvobject = null;

      return e_notimpl;

   }

本文关键:
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top