⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmainwindowwrapper.cpp

📁 《脚本驱动的应用软件开发方法与实践》源码
💻 CPP
字号:
//
// CMainWindowWrapper.cpp
//
// --------------------------------------------------------
// A Practical Guide to Script-Driven Software Development
// Author: Qiming Lu                        Date: 6/1/2006
// MSN Messager: luqiming26@hotmail.com
// MSN Blog: http://spaces.msn.com/jemylu
// --------------------------------------------------------

#include "stdafx.h"
#include "safe_defs.h"
#include "CMainWindowWrapper.h"
#include "CButtonWrapper.h"

/////////////////////////////////////////////////////////////////////////////////////////
CMainWindowWrapper::CMainWindowWrapper(ITypeLib* ptl)
	: mButtons(0)
{
	LoadTypeInfo(ptl);
}

CMainWindowWrapper::~CMainWindowWrapper()
{
	SAFE_RELEASE(mButtons);
}

// APIs exposed to scripts
STDMETHODIMP CMainWindowWrapper::get_buttons(IDispatch** ppdisp)
{
	if (mButtons == 0)
		mButtons = new CButtonSet(m_ptl);
	if (mButtons)
		return mButtons->QueryInterface(IID_IDispatch, (void**)ppdisp);
	return E_FAIL;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -