appframework.h

来自「Mouse Event API Programing」· C头文件 代码 · 共 45 行

H
45
字号
#ifndef _APPFRAMEWORK_H_
#define _APPFRAMEWORK_H_

#ifdef APPFRAMEWORK_DLL_EXPORTS
#define APPFRAMEWORK_DLL_API __declspec(dllexport)
#else
#define APPFRAMEWORK_DLL_API __declspec(dllimport)
#endif

#include <windows.h>
#include <memory>
#include "MouseProc.h"

using namespace std;

class APPFRAMEWORK_DLL_API CAppFramework
	: public CMouseProc
{
protected:
	HINSTANCE m_hInst;
	HWND m_hWnd;
	WNDCLASS m_WndClass;
	LPSTR m_pClassName;

	int m_nPosX;
	int m_nPosY;
	int m_nWidth;
	int m_nHeight;

public:
	CAppFramework();
	virtual ~CAppFramework();

public:
	BOOL CreateWindows(HINSTANCE hInstance, LPSTR pClassName, int nWidth, int nHeight, int nCmdShow);
	int Run();

public:
	// MSG Proc
	static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam);
	virtual LRESULT MSGProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam);
	virtual HRESULT MouseProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam);
};

#endif

⌨️ 快捷键说明

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