1 Star 0 Fork 1

nkjpj/PaintPlus-1

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Application.h 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
ngtritham 提交于 2017-12-06 23:09 . Initial commit
#pragma once
//
// CLASS: CApplication : IUIApplication
//
// PURPOSE: Implements interface IUIApplication that defines methods
// required to manage Framework events.
//
// COMMENTS:
//
// CApplication implements the IUIApplication interface which is required for any ribbon application.
// IUIApplication contains callbacks made by the ribbon framework to the application
// during various updates like command creation/destruction and view state changes.
//
class CApplication : public IUIApplication // Applications must implement IUIApplication.
{
public:
// Static method to create an instance of the object.
static HRESULT CreateInstance(IUIApplication **ppApplication);
// IUnknown
IFACEMETHODIMP QueryInterface(REFIID iid, void** ppv);
IFACEMETHODIMP_(ULONG) AddRef();
IFACEMETHODIMP_(ULONG) Release();
// IUIApplication methods
STDMETHOD(OnCreateUICommand)(UINT nCmdID,
UI_COMMANDTYPE typeID,
IUICommandHandler** ppCommandHandler);
STDMETHOD(OnViewChanged)(UINT viewId,
UI_VIEWTYPE typeId,
IUnknown* pView,
UI_VIEWVERB verb,
INT uReasonCode);
STDMETHOD(OnDestroyUICommand)(UINT32 commandId,
UI_COMMANDTYPE typeID,
IUICommandHandler* commandHandler);
private:
CApplication()
: m_cRef(1)
, m_pCommandHandler(NULL)
{
}
~CApplication()
{
if (m_pCommandHandler)
{
m_pCommandHandler->Release();
m_pCommandHandler = NULL;
}
}
LONG m_cRef; // Reference count.
IUICommandHandler * m_pCommandHandler; // Generic Command Handler
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nkjpj/PaintPlus-1.git
git@gitee.com:nkjpj/PaintPlus-1.git
nkjpj
PaintPlus-1
PaintPlus-1
master

搜索帮助