win32window.h

来自「本人收集整理的一份c/c++跨平台网络库」· C头文件 代码 · 共 51 行

H
51
字号
#ifndef UTILS_BASE_WIN32WINDOW_H_#define UTILS_BASE_WIN32WINDOW_H_#ifdef WIN32#include "win32.h"namespace utils_base {///////////////////////////////////////////////////////////////////////////////// Win32Window///////////////////////////////////////////////////////////////////////////////class Win32Window {public:  Win32Window(){}  virtual ~Win32Window(){}  HWND handle() { return wnd_; }  virtual bool Create(HWND parent, const wchar_t* title, DWORD style, DWORD exstyle,              int x, int y, int cx, int cy)   {	  return false;  }  virtual void Destroy(){}protected:  virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& result)  {	  return false;  }  virtual bool OnClose() { return true; }  virtual void OnDestroyed() { }private:  static LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam,                                  LPARAM lParam);  HWND wnd_;};///////////////////////////////////////////////////////////////////////////////} // namespace utils_base#endif  // WIN32#endif  // UTILS_BASE_WIN32WINDOW_H_

⌨️ 快捷键说明

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