[!if RIBBON_TOOLBAR] // 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面 // (“Fluent UI”)。该示例仅供参考, // 用以补充《Microsoft 基础类参考》和 // MFC C++ 库软件随附的相关电子文档。 // 复制、使用或分发 Fluent UI 的许可条款是单独提供的。 // 若要了解有关 Fluent UI 许可计划的详细信息,请访问 // https://go.microsoft.com/fwlink/?LinkId=238214. // // 版权所有(C) Microsoft Corporation // 保留所有权利。 [!endif] // $wndviewimpl$: $wndviewclass$ 类的实现 // #include "pch.h" #include "framework.h" #include "$appheader$" #include "$wndviewheader$" #ifdef _DEBUG #define new DEBUG_NEW #endif // $wndviewclass$ $wndviewclass$::$wndviewclass$() { [!if ACCESSIBILITY] EnableActiveAccessibility(); [!endif] } $wndviewclass$::~$wndviewclass$() { } BEGIN_MESSAGE_MAP($wndviewclass$, $wndviewbaseclass$) ON_WM_PAINT() END_MESSAGE_MAP() // $wndviewclass$ 消息处理程序 BOOL $wndviewclass$::PreCreateWindow(CREATESTRUCT& cs) { if (!CWnd::PreCreateWindow(cs)) return FALSE; cs.dwExStyle |= WS_EX_CLIENTEDGE; cs.style &= ~WS_BORDER; cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS, ::LoadCursor(nullptr, IDC_ARROW), reinterpret_cast(COLOR_WINDOW+1), nullptr); return TRUE; } void $wndviewclass$::OnPaint() { CPaintDC dc(this); // 用于绘制的设备上下文 // TODO: 在此处添加消息处理程序代码 // 不要为绘制消息而调用 CWnd::OnPaint() }