📄 mfcappadapter.h
字号:
//MfcAppAdapter.h
/*
* Copyright (c) 2005 Alexey Shalnov
* All Rights Reserved
*
* http://home.arcor.de/alexeyshalnov/home/
*/
#pragma once
#include "Hosting\IFramework.h"
#include "IWndManager.h"
#include "MfcCommand.h"
using namespace System;
using namespace System::Windows::Forms;
namespace AS
{
namespace MfcHost2
{
//IFramework implementation
// Connect the Legacy MFC application with WinForms Framework
// MfcAppAdapter helper class
private class IFrameworkImpl:IFramework
{
private:
HWND m_ExternFrameHwnd;
public:
IFrameworkImpl(HWND ExternFrameHwnd);
private:
// get Framework main window handle
virtual HWND GetExternFrame();
};
public ref class MfcAppAdapter
{
private:
IFrameworkImpl* m_pIFrameworkImpl;
IWndManager^ m_pWndManager;
static MfcAppAdapter^ Instance;
MfcAppAdapter();
// finalizer
!MfcAppAdapter();
// initialisation of Legacy MFC application
bool AttachApplication(IWndManager^ wndManager);
internal:
// close Legacy MFC application
~MfcAppAdapter();
//interfaces
IFramework* GetFramework();
public:
// Create Instance of the MfcAppAdapter, create if not exist
static MfcAppAdapter^ CreateInstance(IWndManager^ wndManager);
// Messages transmition
bool OnCmdMsg(MfcCommand commandID);
};
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -