Browse Source

添加IDE项目,用于Opencv辅助工具开发。

Jeff 1 year ago
parent
commit
179519d5c7
74 changed files with 4524 additions and 0 deletions
  1. 31 0
      IDE/IDE.sln
  2. 289 0
      IDE/IDE/CCompatibleDC.cpp
  3. 23 0
      IDE/IDE/CCompatibleDC.h
  4. 332 0
      IDE/IDE/ClassView.cpp
  5. 64 0
      IDE/IDE/ClassView.h
  6. 30 0
      IDE/IDE/DrawObj.cpp
  7. 39 0
      IDE/IDE/DrawObj.h
  8. 266 0
      IDE/IDE/FileView.cpp
  9. 65 0
      IDE/IDE/FileView.h
  10. 12 0
      IDE/IDE/Graph.cpp
  11. 8 0
      IDE/IDE/Graph.h
  12. 253 0
      IDE/IDE/IDE.cpp
  13. 55 0
      IDE/IDE/IDE.h
  14. BIN
      IDE/IDE/IDE.rc
  15. 288 0
      IDE/IDE/IDE.vcxproj
  16. 240 0
      IDE/IDE/IDE.vcxproj.filters
  17. 147 0
      IDE/IDE/IDEDoc.cpp
  18. 58 0
      IDE/IDE/IDEDoc.h
  19. 364 0
      IDE/IDE/IDEView.cpp
  20. 69 0
      IDE/IDE/IDEView.h
  21. 594 0
      IDE/IDE/MainFrm.cpp
  22. 116 0
      IDE/IDE/MainFrm.h
  23. 209 0
      IDE/IDE/OutputWnd.cpp
  24. 69 0
      IDE/IDE/OutputWnd.h
  25. 282 0
      IDE/IDE/PropertiesWnd.cpp
  26. 72 0
      IDE/IDE/PropertiesWnd.h
  27. 135 0
      IDE/IDE/Resource.h
  28. 51 0
      IDE/IDE/ViewTree.cpp
  29. 33 0
      IDE/IDE/ViewTree.h
  30. 171 0
      IDE/IDE/calendarbar.cpp
  31. 46 0
      IDE/IDE/calendarbar.h
  32. BIN
      IDE/IDE/res/IDE.ico
  33. BIN
      IDE/IDE/res/IDE.png
  34. BIN
      IDE/IDE/res/IDE.rc2
  35. BIN
      IDE/IDE/res/IDEDoc.ico
  36. BIN
      IDE/IDE/res/Toolbar.bmp
  37. BIN
      IDE/IDE/res/Toolbar256.bmp
  38. BIN
      IDE/IDE/res/buttons.bmp
  39. BIN
      IDE/IDE/res/class_view.ico
  40. BIN
      IDE/IDE/res/class_view_hc.ico
  41. BIN
      IDE/IDE/res/classview.bmp
  42. BIN
      IDE/IDE/res/classview_hc.bmp
  43. BIN
      IDE/IDE/res/explorer.bmp
  44. BIN
      IDE/IDE/res/explorer_hc.bmp
  45. BIN
      IDE/IDE/res/file_view.ico
  46. BIN
      IDE/IDE/res/file_view_hc.ico
  47. BIN
      IDE/IDE/res/filelarge.bmp
  48. BIN
      IDE/IDE/res/filesmall.bmp
  49. BIN
      IDE/IDE/res/fileview.bmp
  50. BIN
      IDE/IDE/res/fileview_hc.bmp
  51. BIN
      IDE/IDE/res/info.bmp
  52. BIN
      IDE/IDE/res/main.bmp
  53. BIN
      IDE/IDE/res/menuimages.bmp
  54. BIN
      IDE/IDE/res/menuimages_hc.bmp
  55. BIN
      IDE/IDE/res/nav_large.bmp
  56. BIN
      IDE/IDE/res/nav_large_hc.bmp
  57. BIN
      IDE/IDE/res/output_wnd.ico
  58. BIN
      IDE/IDE/res/output_wnd_hc.ico
  59. BIN
      IDE/IDE/res/pages.bmp
  60. BIN
      IDE/IDE/res/pages_hc.bmp
  61. BIN
      IDE/IDE/res/pages_small.bmp
  62. BIN
      IDE/IDE/res/pages_small_hc.bmp
  63. BIN
      IDE/IDE/res/properties.bmp
  64. BIN
      IDE/IDE/res/properties_hc.bmp
  65. BIN
      IDE/IDE/res/properties_wnd.ico
  66. BIN
      IDE/IDE/res/properties_wnd_hc.ico
  67. 0 0
      IDE/IDE/res/ribbon.mfcribbon-ms
  68. BIN
      IDE/IDE/res/sort.bmp
  69. BIN
      IDE/IDE/res/sort_hc.bmp
  70. BIN
      IDE/IDE/res/writelarge.bmp
  71. BIN
      IDE/IDE/res/writesmall.bmp
  72. 18 0
      IDE/IDE/stdafx.cpp
  73. 76 0
      IDE/IDE/stdafx.h
  74. 19 0
      IDE/IDE/targetver.h

+ 31 - 0
IDE/IDE.sln

@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.489
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IDE", "IDE\IDE.vcxproj", "{77608216-0D0C-45C2-94DC-DD2E4F6E5DF0}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{77608216-0D0C-45C2-94DC-DD2E4F6E5DF0}.Debug|x64.ActiveCfg = Debug|x64
+		{77608216-0D0C-45C2-94DC-DD2E4F6E5DF0}.Debug|x64.Build.0 = Debug|x64
+		{77608216-0D0C-45C2-94DC-DD2E4F6E5DF0}.Debug|x86.ActiveCfg = Debug|Win32
+		{77608216-0D0C-45C2-94DC-DD2E4F6E5DF0}.Debug|x86.Build.0 = Debug|Win32
+		{77608216-0D0C-45C2-94DC-DD2E4F6E5DF0}.Release|x64.ActiveCfg = Release|x64
+		{77608216-0D0C-45C2-94DC-DD2E4F6E5DF0}.Release|x64.Build.0 = Release|x64
+		{77608216-0D0C-45C2-94DC-DD2E4F6E5DF0}.Release|x86.ActiveCfg = Release|Win32
+		{77608216-0D0C-45C2-94DC-DD2E4F6E5DF0}.Release|x86.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {EF6C1BEE-1762-4D30-A7DB-056057CD54BE}
+	EndGlobalSection
+EndGlobal

+ 289 - 0
IDE/IDE/CCompatibleDC.cpp

@@ -0,0 +1,289 @@
+#include "stdafx.h"
+#include "CCompatibleDC.h"
+
+#ifndef MAX
+#define MAX(a,b)            (((a) > (b)) ? (a) : (b))
+#endif
+
+#ifndef MIN
+#define MIN(a,b)            (((a) < (b)) ? (a) : (b))
+#endif
+
+
+CCompatibleDC::CCompatibleDC()
+{
+}
+
+
+CCompatibleDC::~CCompatibleDC()
+{
+}
+
+
+BOOL DisplayBMP(CDC* pDC, int nX1, int nY1, int nXX, int nYY, CString strBMPFile, BOOL bStretch)
+{
+	OFSTRUCT of;
+	unsigned fh = OpenFile((char const*)strBMPFile, &of, OF_READ);
+	if (fh == -1) return FALSE;
+
+	DWORD size = (DWORD)(sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD));
+	HANDLE hDIBInfo = GlobalAlloc(GMEM_MOVEABLE, size);
+
+	BITMAPFILEHEADER bf;
+	LPBITMAPINFOHEADER lpbi;
+	lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIBInfo);
+	_lread(fh, (LPSTR)&bf, sizeof(bf));
+	_lread(fh, (LPSTR)lpbi, sizeof(BITMAPINFOHEADER));
+	WORD nClrs = (WORD)lpbi->biClrUsed;
+	size = ((((lpbi->biWidth*lpbi->biBitCount) + 31)&~31) >> 3)*lpbi->biHeight;
+	if (nClrs == 0 && lpbi->biBitCount != 24) nClrs = 1 << lpbi->biBitCount;
+	if (lpbi->biClrUsed == 0) lpbi->biClrUsed = (DWORD)nClrs;
+	if (lpbi->biSizeImage == 0) lpbi->biSizeImage = size;
+
+	WORD Size = (WORD)lpbi->biSize;
+	WORD Width = (WORD)lpbi->biWidth;
+	WORD Height = (WORD)lpbi->biHeight;
+	WORD ClrUsed = (WORD)lpbi->biClrUsed;
+	WORD BitCount = (WORD)lpbi->biBitCount;
+	DWORD SizeImage = lpbi->biSizeImage;
+	WORD SizeRGB = nClrs * sizeof(RGBQUAD);
+	WORD SizeHeader = Size + SizeRGB;
+
+	GlobalUnlock(hDIBInfo);
+	hDIBInfo = GlobalReAlloc(hDIBInfo, SizeHeader + SizeImage, 0);
+	lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIBInfo);
+	_lread(fh, (LPSTR)(lpbi)+Size, SizeRGB);
+	if (bf.bfOffBits != 0L) _llseek(fh, bf.bfOffBits, SEEK_SET);
+
+	DWORD ul = SizeImage;
+	BYTE *hp = (BYTE *)((LPSTR)lpbi + SizeHeader);
+	while (ul > 30000L)
+	{
+		_lread(fh, (LPSTR)hp, 30000L);
+		ul -= 30000L;
+		hp += 30000L;
+	}
+	_lread(fh, (LPSTR)hp, (WORD)ul);
+	_lclose(fh);
+
+	HPALETTE hPalette = NULL, hOldPal = NULL;
+	HANDLE hPalHeader = NULL;
+
+	HDC hDC = pDC->m_hDC;
+	LPBITMAPINFOHEADER lpHeader = lpbi;
+	WORD wDIBUse = DIB_RGB_COLORS;
+
+	if (ClrUsed)
+	{
+		WORD size = sizeof(LOGPALETTE) + ClrUsed * sizeof(PALETTEENTRY);
+		NPLOGPALETTE npPal = (NPLOGPALETTE)LocalAlloc(LMEM_FIXED, size);
+		npPal->palVersion = 0x300;
+		npPal->palNumEntries = ClrUsed;
+		RGBQUAD FAR *lpRGB = (RGBQUAD FAR *)((LPSTR)lpbi + Size);
+		for (WORD i = 0; i < ClrUsed; i++, lpRGB++)
+		{
+			npPal->palPalEntry[i].peRed = lpRGB->rgbRed;
+			npPal->palPalEntry[i].peGreen = lpRGB->rgbGreen;
+			npPal->palPalEntry[i].peBlue = lpRGB->rgbBlue;
+			npPal->palPalEntry[i].peFlags = 0;
+		}
+		hPalette = CreatePalette((LPLOGPALETTE)npPal);
+		LocalFree((HANDLE)npPal);
+		hOldPal = SelectPalette(hDC, hPalette, FALSE);
+		RealizePalette(hDC);
+
+		if (BitCount != 24)
+		{
+			size = Size + ClrUsed * sizeof(WORD);
+			hPalHeader = GlobalAlloc(GMEM_MOVEABLE, size);
+			LPBITMAPINFOHEADER lpPalInfo;
+			lpPalInfo = (LPBITMAPINFOHEADER)GlobalLock(hPalHeader);
+			*lpPalInfo = *lpbi;
+			WORD FAR *lpTable = (WORD FAR *)((LPSTR)lpPalInfo + Size);
+			for (WORD i = 0; i < ClrUsed; i++) *lpTable++ = i;
+			GlobalUnlock(hPalHeader);
+			lpHeader = (LPBITMAPINFOHEADER)GlobalLock(hPalHeader);
+			wDIBUse = DIB_PAL_COLORS;
+		}
+	}
+
+	HDC hMemDC = CreateCompatibleDC(hDC);
+	HBITMAP hDDBitmap = CreateCompatibleBitmap(hDC, Width, Height);
+	SetDIBits(hDC, hDDBitmap, 0, Height, (LPSTR)lpbi + SizeHeader,
+		(LPBITMAPINFO)lpHeader, wDIBUse);
+	HBITMAP hOldBitmap = (HBITMAP)SelectObject(hMemDC, hDDBitmap);
+	if (bStretch)
+	{
+		StretchBlt(hDC, nX1, nY1, nXX, nYY, hMemDC, 0, 0, Width, Height, SRCCOPY);
+	}
+	else
+	{
+		Width = MIN(Width, nXX);
+		Height = MIN(Height, nYY);
+		BitBlt(hDC, nX1, nY1, Width, Height, hMemDC, 0, 0, SRCCOPY);
+	}
+	SelectObject(hMemDC, hOldBitmap);
+	DeleteDC(hMemDC);
+	DeleteObject(hDDBitmap);
+
+	if (ClrUsed)
+	{
+		SelectPalette(hDC, hOldPal, FALSE);
+		DeleteObject(hPalette);
+		if (BitCount != 24)
+		{
+			GlobalUnlock(hPalHeader);
+			GlobalFree(hPalHeader);
+		}
+	}
+
+	GlobalUnlock(hDIBInfo);
+	GlobalFree(hDIBInfo);
+	return TRUE;
+}
+
+
+void DrawColorButton(LPDRAWITEMSTRUCT lpDIS, COLORREF clrButton)
+{
+	CDC* pDC = CDC::FromHandle(lpDIS->hDC);
+	CRect rectButton = lpDIS->rcItem;
+	UINT nStyle = DFCS_BUTTONPUSH;
+	if (lpDIS->itemState & ODS_SELECTED) nStyle |= DFCS_PUSHED;
+	if (lpDIS->itemState & ODS_DISABLED) nStyle |= DFCS_INACTIVE;
+	pDC->DrawFrameControl(rectButton, DFC_BUTTON, nStyle);
+	CRect rectColor = lpDIS->rcItem;
+	rectColor.InflateRect(-1, -1, -1, -1);
+	if (lpDIS->itemState & ODS_SELECTED) rectColor.InflateRect(-1, -1, 1, 1);
+	if (lpDIS->itemState & ODS_DISABLED)
+	{
+		CPen pen(PS_SOLID, 1, RGB(128, 128, 128));
+		CPen* pOldPen = pDC->SelectObject(&pen);
+		pDC->SetBkColor(RGB(192, 192, 192));
+		pDC->SetTextColor(clrButton);
+		CBrush* pBrush = pDC->GetHalftoneBrush();
+		CBrush* pOldBrush = pDC->SelectObject(pBrush);
+		pDC->Rectangle(rectColor);
+		pDC->SelectObject(pOldBrush);
+		pDC->SelectObject(pOldPen);
+	}
+	else
+	{
+		CBrush brush(clrButton);
+		CBrush* pOldBrush = pDC->SelectObject(&brush);
+		pDC->SelectStockObject(BLACK_PEN);
+		pDC->Rectangle(rectColor);
+		pDC->SelectObject(pOldBrush);
+	}
+}
+
+
+void CCompatibleDC::Create(CDC* pDC)
+{
+	m_pDrawDC = pDC;
+	// 获取裁剪区域;
+	m_pDrawDC->GetClipBox(m_rect);
+	m_rect.right++;
+	m_rect.bottom++;
+	// 创建兼容DC;
+	CreateCompatibleDC(m_pDrawDC);
+	// 如果存在裁剪区域;
+	//if (m_rect.Width() > 0)
+	if(!m_rect.IsRectEmpty() && !m_rect.IsRectNull())
+	{
+		// 创建兼容画布;
+		m_bitmap.CreateCompatibleBitmap(m_pDrawDC, m_rect.Width(), m_rect.Height());
+		m_pOldBitmap = SelectObject(&m_bitmap);
+		OffsetViewportOrg(-m_rect.left, -m_rect.top);
+		IntersectClipRect(m_rect);
+		CPoint point(0, 0);
+		LPtoDP(&point);
+		SetBrushOrg(point);
+
+		//2011-11-01 add
+		DeleteObject(m_bitmap);
+	}
+
+	//2011-11-02 add
+	DeleteObject(m_pDrawDC);
+}
+
+void CCompatibleDC::Destroy(void)
+{
+	SelectClipRgn(NULL);
+	SetViewportOrg(0, 0);
+	m_pDrawDC->BitBlt(m_rect.left, m_rect.top, m_rect.Width(), m_rect.Height(), this, 0, 0, SRCCOPY);
+	SelectObject(m_pOldBitmap);
+}
+
+void CCompatibleDC::Destroy(CRect rect)
+{
+	SelectClipRgn(NULL);
+	SetViewportOrg(0, 0);
+
+	CRect rc1, rc2, rc3, rc4;
+	//////////////////////////////////////
+	//				2					//
+	//									//
+	//		///////////////				//
+	//	1	//			//		3		//
+	//		//			//				//
+	//		//////////////				//
+	//									//
+	//				4					//
+	//									//
+	//////////////////////////////////////
+	rc1.left = m_rect.left;
+	rc1.right = rect.left;
+	rc1.top = m_rect.top;
+	rc1.bottom = m_rect.bottom;
+
+	rc2.left = m_rect.left;
+	rc2.right = m_rect.right;
+	rc2.top = m_rect.top;
+	rc2.bottom = rect.top;
+
+	rc3.left = rect.right;
+	rc3.right = m_rect.right;
+	rc3.top = m_rect.top;
+	rc3.bottom = m_rect.bottom;
+
+	rc4.left = m_rect.left;
+	rc4.right = m_rect.right;
+	rc4.top = rect.bottom;
+	rc4.bottom = m_rect.bottom;
+
+	m_pDrawDC->BitBlt(rc1.left, rc1.top, rc1.Width() / 1, rc1.Height(), this, 0, 0, SRCCOPY);
+	m_pDrawDC->BitBlt(rc2.left, rc2.top, rc2.Width() / 1, rc2.Height(), this, 0, rc2.top, SRCCOPY);
+	m_pDrawDC->BitBlt(rc3.left, rc3.top, rc3.Width() / 1, rc3.Height(), this, rc3.left, rc3.top, SRCCOPY);
+	m_pDrawDC->BitBlt(rc4.left, rc4.top, rc4.Width() / 1, rc4.Height(), this, 0, rc4.top, SRCCOPY);
+	SelectObject(m_pOldBitmap);
+	//if( m_rect.left<rect.left )
+	//{
+	//	rc1.left = m_rect.left;
+	//	rc1.right = m_rect.right;
+	//	rc1.top = m_rect.top;
+	//	rc1.bottom = rect.top;
+
+	//	rc2.left = m_rect.left;
+	//	rc2.right = rect.left;
+	//	rc2.top = m_rect.top;
+	//	rc2.bottom = m_rect.bottom;
+
+	//	rc3.left = rect.right;
+	//	rc3.right = m_rect.right;
+	//	rc3.top = m_rect.top;
+	//	rc3.bottom = m_rect.bottom;
+
+	//	rc4.left = m_rect.left;
+	//	rc4.right = m_rect.right;
+	//	rc4.top = rect.bottom;
+	//	rc4.bottom = m_rect.bottom;
+
+	//m_pDrawDC->BitBlt(rc1.left,rc1.top,rc1.Width()/1,rc1.Height(),this, 0,0, SRCCOPY);
+	//m_pDrawDC->BitBlt(rc2.left,rc2.top,rc2.Width()/1,rc2.Height(),this, 0,rc2.top, SRCCOPY);
+	//m_pDrawDC->BitBlt(rc3.left,rc3.top,rc3.Width()/1,rc3.Height(),this, rc3.left,rc3.top, SRCCOPY);
+	//m_pDrawDC->BitBlt(rc4.left,rc4.top,rc4.Width()/1,rc4.Height(),this, 0,rc4.top, SRCCOPY);
+	//SelectObject(m_pOldBitmap);
+
+
+}

+ 23 - 0
IDE/IDE/CCompatibleDC.h

@@ -0,0 +1,23 @@
+#pragma once
+#include <afxwin.h>
+
+BOOL DisplayBMP(CDC* pDC, int nX1, int nY1, int nXX, int nYY, CString strBMPFile, BOOL bStretch);
+void DrawColorButton(LPDRAWITEMSTRUCT lpDIS, COLORREF clrButton);
+
+
+class CCompatibleDC :public CDC
+{
+public:
+	CCompatibleDC();
+	~CCompatibleDC();
+
+private:
+	CDC* m_pDrawDC;
+	CRect m_rect;
+	CBitmap m_bitmap, *m_pOldBitmap;
+public:
+	void Create(CDC* pDC);
+	void Destroy(void);
+	void Destroy(CRect rect);
+};
+

+ 332 - 0
IDE/IDE/ClassView.cpp

@@ -0,0 +1,332 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面 
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和 
+// MFC C++ 库软件随附的相关电子文档。  
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。  
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问 
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+#include "stdafx.h"
+#include "MainFrm.h"
+#include "ClassView.h"
+#include "Resource.h"
+#include "IDE.h"
+
+class CClassViewMenuButton : public CMFCToolBarMenuButton
+{
+	friend class CClassView;
+
+	DECLARE_SERIAL(CClassViewMenuButton)
+
+public:
+	CClassViewMenuButton(HMENU hMenu = nullptr) noexcept : CMFCToolBarMenuButton((UINT)-1, hMenu, -1)
+	{
+	}
+
+	virtual void OnDraw(CDC* pDC, const CRect& rect, CMFCToolBarImages* pImages, BOOL bHorz = TRUE,
+		BOOL bCustomizeMode = FALSE, BOOL bHighlight = FALSE, BOOL bDrawBorder = TRUE, BOOL bGrayDisabledButtons = TRUE)
+	{
+		pImages = CMFCToolBar::GetImages();
+
+		CAfxDrawState ds;
+		pImages->PrepareDrawImage(ds);
+
+		CMFCToolBarMenuButton::OnDraw(pDC, rect, pImages, bHorz, bCustomizeMode, bHighlight, bDrawBorder, bGrayDisabledButtons);
+
+		pImages->EndDrawImage(ds);
+	}
+};
+
+IMPLEMENT_SERIAL(CClassViewMenuButton, CMFCToolBarMenuButton, 1)
+
+//////////////////////////////////////////////////////////////////////
+// 构造/析构
+//////////////////////////////////////////////////////////////////////
+
+CClassView::CClassView() noexcept
+{
+	m_nCurrSort = ID_SORTING_GROUPBYTYPE;
+}
+
+CClassView::~CClassView()
+{
+}
+
+BEGIN_MESSAGE_MAP(CClassView, CDockablePane)
+	ON_WM_CREATE()
+	ON_WM_SIZE()
+	ON_WM_CONTEXTMENU()
+	ON_COMMAND(ID_CLASS_ADD_MEMBER_FUNCTION, OnClassAddMemberFunction)
+	ON_COMMAND(ID_CLASS_ADD_MEMBER_VARIABLE, OnClassAddMemberVariable)
+	ON_COMMAND(ID_CLASS_DEFINITION, OnClassDefinition)
+	ON_COMMAND(ID_CLASS_PROPERTIES, OnClassProperties)
+	ON_COMMAND(ID_NEW_FOLDER, OnNewFolder)
+	ON_WM_PAINT()
+	ON_WM_SETFOCUS()
+	ON_COMMAND_RANGE(ID_SORTING_GROUPBYTYPE, ID_SORTING_SORTBYACCESS, OnSort)
+	ON_UPDATE_COMMAND_UI_RANGE(ID_SORTING_GROUPBYTYPE, ID_SORTING_SORTBYACCESS, OnUpdateSort)
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CClassView 消息处理程序
+
+int CClassView::OnCreate(LPCREATESTRUCT lpCreateStruct)
+{
+	if (CDockablePane::OnCreate(lpCreateStruct) == -1)
+		return -1;
+
+	CRect rectDummy;
+	rectDummy.SetRectEmpty();
+
+	// 创建视图: 
+	const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS | WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
+
+	if (!m_wndClassView.Create(dwViewStyle, rectDummy, this, 2))
+	{
+		TRACE0("未能创建类视图\n");
+		return -1;      // 未能创建
+	}
+
+	// 加载图像: 
+	m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_SORT);
+	m_wndToolBar.LoadToolBar(IDR_SORT, 0, 0, TRUE /* 已锁定*/);
+
+	OnChangeVisualStyle();
+
+	m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
+	m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
+
+	m_wndToolBar.SetOwner(this);
+
+	// 所有命令将通过此控件路由,而不是通过主框架路由: 
+	m_wndToolBar.SetRouteCommandsViaFrame(FALSE);
+
+	CMenu menuSort;
+	menuSort.LoadMenu(IDR_POPUP_SORT);
+
+	m_wndToolBar.ReplaceButton(ID_SORT_MENU, CClassViewMenuButton(menuSort.GetSubMenu(0)->GetSafeHmenu()));
+
+	CClassViewMenuButton* pButton =  DYNAMIC_DOWNCAST(CClassViewMenuButton, m_wndToolBar.GetButton(0));
+
+	if (pButton != nullptr)
+	{
+		pButton->m_bText = FALSE;
+		pButton->m_bImage = TRUE;
+		pButton->SetImage(GetCmdMgr()->GetCmdImage(m_nCurrSort));
+		pButton->SetMessageWnd(this);
+	}
+
+	// 填入一些静态树视图数据(此处只需填入虚拟代码,而不是复杂的数据)
+	FillClassView();
+
+	return 0;
+}
+
+void CClassView::OnSize(UINT nType, int cx, int cy)
+{
+	CDockablePane::OnSize(nType, cx, cy);
+	AdjustLayout();
+}
+
+void CClassView::FillClassView()
+{
+	HTREEITEM hRoot = m_wndClassView.InsertItem(_T("FakeApp 类"), 0, 0);
+	m_wndClassView.SetItemState(hRoot, TVIS_BOLD, TVIS_BOLD);
+
+	HTREEITEM hClass = m_wndClassView.InsertItem(_T("CFakeAboutDlg"), 1, 1, hRoot);
+	m_wndClassView.InsertItem(_T("CFakeAboutDlg()"), 3, 3, hClass);
+
+	m_wndClassView.Expand(hRoot, TVE_EXPAND);
+
+	hClass = m_wndClassView.InsertItem(_T("CFakeApp"), 1, 1, hRoot);
+	m_wndClassView.InsertItem(_T("CFakeApp()"), 3, 3, hClass);
+	m_wndClassView.InsertItem(_T("InitInstance()"), 3, 3, hClass);
+	m_wndClassView.InsertItem(_T("OnAppAbout()"), 3, 3, hClass);
+
+	hClass = m_wndClassView.InsertItem(_T("CFakeAppDoc"), 1, 1, hRoot);
+	m_wndClassView.InsertItem(_T("CFakeAppDoc()"), 4, 4, hClass);
+	m_wndClassView.InsertItem(_T("~CFakeAppDoc()"), 3, 3, hClass);
+	m_wndClassView.InsertItem(_T("OnNewDocument()"), 3, 3, hClass);
+
+	hClass = m_wndClassView.InsertItem(_T("CFakeAppView"), 1, 1, hRoot);
+	m_wndClassView.InsertItem(_T("CFakeAppView()"), 4, 4, hClass);
+	m_wndClassView.InsertItem(_T("~CFakeAppView()"), 3, 3, hClass);
+	m_wndClassView.InsertItem(_T("GetDocument()"), 3, 3, hClass);
+	m_wndClassView.Expand(hClass, TVE_EXPAND);
+
+	hClass = m_wndClassView.InsertItem(_T("CFakeAppFrame"), 1, 1, hRoot);
+	m_wndClassView.InsertItem(_T("CFakeAppFrame()"), 3, 3, hClass);
+	m_wndClassView.InsertItem(_T("~CFakeAppFrame()"), 3, 3, hClass);
+	m_wndClassView.InsertItem(_T("m_wndMenuBar"), 6, 6, hClass);
+	m_wndClassView.InsertItem(_T("m_wndToolBar"), 6, 6, hClass);
+	m_wndClassView.InsertItem(_T("m_wndStatusBar"), 6, 6, hClass);
+
+	hClass = m_wndClassView.InsertItem(_T("Globals"), 2, 2, hRoot);
+	m_wndClassView.InsertItem(_T("theFakeApp"), 5, 5, hClass);
+	m_wndClassView.Expand(hClass, TVE_EXPAND);
+}
+
+void CClassView::OnContextMenu(CWnd* pWnd, CPoint point)
+{
+	CTreeCtrl* pWndTree = (CTreeCtrl*)&m_wndClassView;
+	ASSERT_VALID(pWndTree);
+
+	if (pWnd != pWndTree)
+	{
+		CDockablePane::OnContextMenu(pWnd, point);
+		return;
+	}
+
+	if (point != CPoint(-1, -1))
+	{
+		// 选择已单击的项: 
+		CPoint ptTree = point;
+		pWndTree->ScreenToClient(&ptTree);
+
+		UINT flags = 0;
+		HTREEITEM hTreeItem = pWndTree->HitTest(ptTree, &flags);
+		if (hTreeItem != nullptr)
+		{
+			pWndTree->SelectItem(hTreeItem);
+		}
+	}
+
+	pWndTree->SetFocus();
+	CMenu menu;
+	menu.LoadMenu(IDR_POPUP_SORT);
+
+	CMenu* pSumMenu = menu.GetSubMenu(0);
+
+	if (AfxGetMainWnd()->IsKindOf(RUNTIME_CLASS(CMDIFrameWndEx)))
+	{
+		CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
+
+		if (!pPopupMenu->Create(this, point.x, point.y, (HMENU)pSumMenu->m_hMenu, FALSE, TRUE))
+			return;
+
+		((CMDIFrameWndEx*)AfxGetMainWnd())->OnShowPopupMenu(pPopupMenu);
+		UpdateDialogControls(this, FALSE);
+	}
+}
+
+void CClassView::AdjustLayout()
+{
+	if (GetSafeHwnd() == nullptr)
+	{
+		return;
+	}
+
+	CRect rectClient;
+	GetClientRect(rectClient);
+
+	int cyTlb = m_wndToolBar.CalcFixedLayout(FALSE, TRUE).cy;
+
+	m_wndToolBar.SetWindowPos(nullptr, rectClient.left, rectClient.top, rectClient.Width(), cyTlb, SWP_NOACTIVATE | SWP_NOZORDER);
+	m_wndClassView.SetWindowPos(nullptr, rectClient.left + 1, rectClient.top + cyTlb + 1, rectClient.Width() - 2, rectClient.Height() - cyTlb - 2, SWP_NOACTIVATE | SWP_NOZORDER);
+}
+
+BOOL CClassView::PreTranslateMessage(MSG* pMsg)
+{
+	return CDockablePane::PreTranslateMessage(pMsg);
+}
+
+void CClassView::OnSort(UINT id)
+{
+	if (m_nCurrSort == id)
+	{
+		return;
+	}
+
+	m_nCurrSort = id;
+
+	CClassViewMenuButton* pButton =  DYNAMIC_DOWNCAST(CClassViewMenuButton, m_wndToolBar.GetButton(0));
+
+	if (pButton != nullptr)
+	{
+		pButton->SetImage(GetCmdMgr()->GetCmdImage(id));
+		m_wndToolBar.Invalidate();
+		m_wndToolBar.UpdateWindow();
+	}
+}
+
+void CClassView::OnUpdateSort(CCmdUI* pCmdUI)
+{
+	pCmdUI->SetCheck(pCmdUI->m_nID == m_nCurrSort);
+}
+
+void CClassView::OnClassAddMemberFunction()
+{
+	AfxMessageBox(_T("添加成员函数..."));
+}
+
+void CClassView::OnClassAddMemberVariable()
+{
+	// TODO: 在此处添加命令处理程序代码
+}
+
+void CClassView::OnClassDefinition()
+{
+	// TODO: 在此处添加命令处理程序代码
+}
+
+void CClassView::OnClassProperties()
+{
+	// TODO: 在此处添加命令处理程序代码
+}
+
+void CClassView::OnNewFolder()
+{
+	AfxMessageBox(_T("新建文件夹..."));
+}
+
+void CClassView::OnPaint()
+{
+	CPaintDC dc(this); // 用于绘制的设备上下文
+
+	CRect rectTree;
+	m_wndClassView.GetWindowRect(rectTree);
+	ScreenToClient(rectTree);
+
+	rectTree.InflateRect(1, 1);
+	dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW));
+}
+
+void CClassView::OnSetFocus(CWnd* pOldWnd)
+{
+	CDockablePane::OnSetFocus(pOldWnd);
+
+	m_wndClassView.SetFocus();
+}
+
+void CClassView::OnChangeVisualStyle()
+{
+	m_ClassViewImages.DeleteImageList();
+
+	UINT uiBmpId = theApp.m_bHiColorIcons ? IDB_CLASS_VIEW_24 : IDB_CLASS_VIEW;
+
+	CBitmap bmp;
+	if (!bmp.LoadBitmap(uiBmpId))
+	{
+		TRACE(_T("无法加载位图: %x\n"), uiBmpId);
+		ASSERT(FALSE);
+		return;
+	}
+
+	BITMAP bmpObj;
+	bmp.GetBitmap(&bmpObj);
+
+	UINT nFlags = ILC_MASK;
+
+	nFlags |= (theApp.m_bHiColorIcons) ? ILC_COLOR24 : ILC_COLOR4;
+
+	m_ClassViewImages.Create(16, bmpObj.bmHeight, nFlags, 0, 0);
+	m_ClassViewImages.Add(&bmp, RGB(255, 0, 0));
+
+	m_wndClassView.SetImageList(&m_ClassViewImages, TVSIL_NORMAL);
+
+	m_wndToolBar.CleanUpLockedImages();
+	m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_SORT_24 : IDR_SORT, 0, 0, TRUE /* 锁定*/);
+}

+ 64 - 0
IDE/IDE/ClassView.h

@@ -0,0 +1,64 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面 
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和 
+// MFC C++ 库软件随附的相关电子文档。  
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。  
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问 
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+#pragma once
+
+#include "ViewTree.h"
+
+class CClassToolBar : public CMFCToolBar
+{
+	virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
+	{
+		CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
+	}
+
+	virtual BOOL AllowShowOnList() const { return FALSE; }
+};
+
+class CClassView : public CDockablePane
+{
+public:
+	CClassView() noexcept;
+	virtual ~CClassView();
+
+	void AdjustLayout();
+	void OnChangeVisualStyle();
+
+protected:
+	CClassToolBar m_wndToolBar;
+	CViewTree m_wndClassView;
+	CImageList m_ClassViewImages;
+	UINT m_nCurrSort;
+
+	void FillClassView();
+
+// 重写
+public:
+	virtual BOOL PreTranslateMessage(MSG* pMsg);
+
+protected:
+	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
+	afx_msg void OnSize(UINT nType, int cx, int cy);
+	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
+	afx_msg void OnClassAddMemberFunction();
+	afx_msg void OnClassAddMemberVariable();
+	afx_msg void OnClassDefinition();
+	afx_msg void OnClassProperties();
+	afx_msg void OnNewFolder();
+	afx_msg void OnPaint();
+	afx_msg void OnSetFocus(CWnd* pOldWnd);
+	afx_msg LRESULT OnChangeActiveTab(WPARAM, LPARAM);
+	afx_msg void OnSort(UINT id);
+	afx_msg void OnUpdateSort(CCmdUI* pCmdUI);
+
+	DECLARE_MESSAGE_MAP()
+};
+

+ 30 - 0
IDE/IDE/DrawObj.cpp

@@ -0,0 +1,30 @@
+#include "stdafx.h"
+#include "DrawObj.h"
+
+
+CDrawObj::CDrawObj()
+{
+}
+
+
+CDrawObj::~CDrawObj()
+{
+}
+
+
+CDrawGrid::CDrawGrid()
+{
+}
+
+CDrawGrid::~CDrawGrid()
+{
+}
+
+
+CDrawBitmap::CDrawBitmap()
+{
+}
+
+CDrawBitmap::~CDrawBitmap()
+{
+}

+ 39 - 0
IDE/IDE/DrawObj.h

@@ -0,0 +1,39 @@
+#pragma once
+
+class CDrawObj
+{
+public:
+	CDrawObj();
+	~CDrawObj();
+
+public:
+	// ËùÔÚÊÓͼ;
+	CView	*m_pView;
+	// ÏÔʾÇøÓò;
+	CRect	m_rect;
+};
+
+class CDrawGrid:public CDrawObj
+{
+public:
+	CDrawGrid();
+	~CDrawGrid();
+
+private:
+
+};
+
+
+class CDrawBitmap :public CDrawObj
+{
+public:
+	CDrawBitmap();
+	~CDrawBitmap();
+
+	CString m_strpath;
+	// GDI+
+	Image*			m_image;
+private:
+
+};
+

+ 266 - 0
IDE/IDE/FileView.cpp

@@ -0,0 +1,266 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面 
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和 
+// MFC C++ 库软件随附的相关电子文档。  
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。  
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问 
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+#include "stdafx.h"
+#include "mainfrm.h"
+#include "FileView.h"
+#include "Resource.h"
+#include "IDE.h"
+
+#ifdef _DEBUG
+#undef THIS_FILE
+static char THIS_FILE[]=__FILE__;
+#define new DEBUG_NEW
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CFileView
+
+CFileView::CFileView() noexcept
+{
+}
+
+CFileView::~CFileView()
+{
+}
+
+BEGIN_MESSAGE_MAP(CFileView, CDockablePane)
+	ON_WM_CREATE()
+	ON_WM_SIZE()
+	ON_WM_CONTEXTMENU()
+	ON_COMMAND(ID_PROPERTIES, OnProperties)
+	ON_COMMAND(ID_OPEN, OnFileOpen)
+	ON_COMMAND(ID_OPEN_WITH, OnFileOpenWith)
+	ON_COMMAND(ID_DUMMY_COMPILE, OnDummyCompile)
+	ON_COMMAND(ID_EDIT_CUT, OnEditCut)
+	ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
+	ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
+	ON_WM_PAINT()
+	ON_WM_SETFOCUS()
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CWorkspaceBar 消息处理程序
+
+int CFileView::OnCreate(LPCREATESTRUCT lpCreateStruct)
+{
+	if (CDockablePane::OnCreate(lpCreateStruct) == -1)
+		return -1;
+
+	CRect rectDummy;
+	rectDummy.SetRectEmpty();
+
+	// 创建视图: 
+	const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS;
+
+	if (!m_wndFileView.Create(dwViewStyle, rectDummy, this, 4))
+	{
+		TRACE0("未能创建文件视图\n");
+		return -1;      // 未能创建
+	}
+
+	// 加载视图图像: 
+	m_FileViewImages.Create(IDB_FILE_VIEW, 16, 0, RGB(255, 0, 255));
+	m_wndFileView.SetImageList(&m_FileViewImages, TVSIL_NORMAL);
+
+	m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_EXPLORER);
+	m_wndToolBar.LoadToolBar(IDR_EXPLORER, 0, 0, TRUE /* 已锁定*/);
+
+	OnChangeVisualStyle();
+
+	m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
+
+	m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
+
+	m_wndToolBar.SetOwner(this);
+
+	// 所有命令将通过此控件路由,而不是通过主框架路由: 
+	m_wndToolBar.SetRouteCommandsViaFrame(FALSE);
+
+	// 填入一些静态树视图数据(此处只需填入虚拟代码,而不是复杂的数据)
+	FillFileView();
+	AdjustLayout();
+
+	return 0;
+}
+
+void CFileView::OnSize(UINT nType, int cx, int cy)
+{
+	CDockablePane::OnSize(nType, cx, cy);
+	AdjustLayout();
+}
+
+void CFileView::FillFileView()
+{
+	HTREEITEM hRoot = m_wndFileView.InsertItem(_T("FakeApp 文件"), 0, 0);
+	m_wndFileView.SetItemState(hRoot, TVIS_BOLD, TVIS_BOLD);
+
+	HTREEITEM hSrc = m_wndFileView.InsertItem(_T("FakeApp 源文件"), 0, 0, hRoot);
+
+	m_wndFileView.InsertItem(_T("FakeApp.cpp"), 1, 1, hSrc);
+	m_wndFileView.InsertItem(_T("FakeApp.rc"), 1, 1, hSrc);
+	m_wndFileView.InsertItem(_T("FakeAppDoc.cpp"), 1, 1, hSrc);
+	m_wndFileView.InsertItem(_T("FakeAppView.cpp"), 1, 1, hSrc);
+	m_wndFileView.InsertItem(_T("MainFrm.cpp"), 1, 1, hSrc);
+	m_wndFileView.InsertItem(_T("StdAfx.cpp"), 1, 1, hSrc);
+
+	HTREEITEM hInc = m_wndFileView.InsertItem(_T("FakeApp 头文件"), 0, 0, hRoot);
+
+	m_wndFileView.InsertItem(_T("FakeApp.h"), 2, 2, hInc);
+	m_wndFileView.InsertItem(_T("FakeAppDoc.h"), 2, 2, hInc);
+	m_wndFileView.InsertItem(_T("FakeAppView.h"), 2, 2, hInc);
+	m_wndFileView.InsertItem(_T("Resource.h"), 2, 2, hInc);
+	m_wndFileView.InsertItem(_T("MainFrm.h"), 2, 2, hInc);
+	m_wndFileView.InsertItem(_T("StdAfx.h"), 2, 2, hInc);
+
+	HTREEITEM hRes = m_wndFileView.InsertItem(_T("FakeApp 资源文件"), 0, 0, hRoot);
+
+	m_wndFileView.InsertItem(_T("FakeApp.ico"), 2, 2, hRes);
+	m_wndFileView.InsertItem(_T("FakeApp.rc2"), 2, 2, hRes);
+	m_wndFileView.InsertItem(_T("FakeAppDoc.ico"), 2, 2, hRes);
+	m_wndFileView.InsertItem(_T("FakeToolbar.bmp"), 2, 2, hRes);
+
+	m_wndFileView.Expand(hRoot, TVE_EXPAND);
+	m_wndFileView.Expand(hSrc, TVE_EXPAND);
+	m_wndFileView.Expand(hInc, TVE_EXPAND);
+}
+
+void CFileView::OnContextMenu(CWnd* pWnd, CPoint point)
+{
+	CTreeCtrl* pWndTree = (CTreeCtrl*) &m_wndFileView;
+	ASSERT_VALID(pWndTree);
+
+	if (pWnd != pWndTree)
+	{
+		CDockablePane::OnContextMenu(pWnd, point);
+		return;
+	}
+
+	if (point != CPoint(-1, -1))
+	{
+		// 选择已单击的项: 
+		CPoint ptTree = point;
+		pWndTree->ScreenToClient(&ptTree);
+
+		UINT flags = 0;
+		HTREEITEM hTreeItem = pWndTree->HitTest(ptTree, &flags);
+		if (hTreeItem != nullptr)
+		{
+			pWndTree->SelectItem(hTreeItem);
+		}
+	}
+
+	pWndTree->SetFocus();
+	theApp.GetContextMenuManager()->ShowPopupMenu(IDR_POPUP_EXPLORER, point.x, point.y, this, TRUE);
+}
+
+void CFileView::AdjustLayout()
+{
+	if (GetSafeHwnd() == nullptr)
+	{
+		return;
+	}
+
+	CRect rectClient;
+	GetClientRect(rectClient);
+
+	int cyTlb = m_wndToolBar.CalcFixedLayout(FALSE, TRUE).cy;
+
+	m_wndToolBar.SetWindowPos(nullptr, rectClient.left, rectClient.top, rectClient.Width(), cyTlb, SWP_NOACTIVATE | SWP_NOZORDER);
+	m_wndFileView.SetWindowPos(nullptr, rectClient.left + 1, rectClient.top + cyTlb + 1, rectClient.Width() - 2, rectClient.Height() - cyTlb - 2, SWP_NOACTIVATE | SWP_NOZORDER);
+}
+
+void CFileView::OnProperties()
+{
+	AfxMessageBox(_T("属性...."));
+
+}
+
+void CFileView::OnFileOpen()
+{
+	// TODO: 在此处添加命令处理程序代码
+}
+
+void CFileView::OnFileOpenWith()
+{
+	// TODO: 在此处添加命令处理程序代码
+}
+
+void CFileView::OnDummyCompile()
+{
+	// TODO: 在此处添加命令处理程序代码
+}
+
+void CFileView::OnEditCut()
+{
+	// TODO: 在此处添加命令处理程序代码
+}
+
+void CFileView::OnEditCopy()
+{
+	// TODO: 在此处添加命令处理程序代码
+}
+
+void CFileView::OnEditClear()
+{
+	// TODO: 在此处添加命令处理程序代码
+}
+
+void CFileView::OnPaint()
+{
+	CPaintDC dc(this); // 用于绘制的设备上下文
+
+	CRect rectTree;
+	m_wndFileView.GetWindowRect(rectTree);
+	ScreenToClient(rectTree);
+
+	rectTree.InflateRect(1, 1);
+	dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW));
+}
+
+void CFileView::OnSetFocus(CWnd* pOldWnd)
+{
+	CDockablePane::OnSetFocus(pOldWnd);
+
+	m_wndFileView.SetFocus();
+}
+
+void CFileView::OnChangeVisualStyle()
+{
+	m_wndToolBar.CleanUpLockedImages();
+	m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_EXPLORER_24 : IDR_EXPLORER, 0, 0, TRUE /* 锁定*/);
+
+	m_FileViewImages.DeleteImageList();
+
+	UINT uiBmpId = theApp.m_bHiColorIcons ? IDB_FILE_VIEW_24 : IDB_FILE_VIEW;
+
+	CBitmap bmp;
+	if (!bmp.LoadBitmap(uiBmpId))
+	{
+		TRACE(_T("无法加载位图: %x\n"), uiBmpId);
+		ASSERT(FALSE);
+		return;
+	}
+
+	BITMAP bmpObj;
+	bmp.GetBitmap(&bmpObj);
+
+	UINT nFlags = ILC_MASK;
+
+	nFlags |= (theApp.m_bHiColorIcons) ? ILC_COLOR24 : ILC_COLOR4;
+
+	m_FileViewImages.Create(16, bmpObj.bmHeight, nFlags, 0, 0);
+	m_FileViewImages.Add(&bmp, RGB(255, 0, 255));
+
+	m_wndFileView.SetImageList(&m_FileViewImages, TVSIL_NORMAL);
+}
+
+

+ 65 - 0
IDE/IDE/FileView.h

@@ -0,0 +1,65 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面 
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和 
+// MFC C++ 库软件随附的相关电子文档。  
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。  
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问 
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+#pragma once
+
+#include "ViewTree.h"
+
+class CFileViewToolBar : public CMFCToolBar
+{
+	virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
+	{
+		CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
+	}
+
+	virtual BOOL AllowShowOnList() const { return FALSE; }
+};
+
+class CFileView : public CDockablePane
+{
+// 构造
+public:
+	CFileView() noexcept;
+
+	void AdjustLayout();
+	void OnChangeVisualStyle();
+
+// 特性
+protected:
+
+	CViewTree m_wndFileView;
+	CImageList m_FileViewImages;
+	CFileViewToolBar m_wndToolBar;
+
+protected:
+	void FillFileView();
+
+// 实现
+public:
+	virtual ~CFileView();
+
+protected:
+	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
+	afx_msg void OnSize(UINT nType, int cx, int cy);
+	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
+	afx_msg void OnProperties();
+	afx_msg void OnFileOpen();
+	afx_msg void OnFileOpenWith();
+	afx_msg void OnDummyCompile();
+	afx_msg void OnEditCut();
+	afx_msg void OnEditCopy();
+	afx_msg void OnEditClear();
+	afx_msg void OnPaint();
+	afx_msg void OnSetFocus(CWnd* pOldWnd);
+
+	DECLARE_MESSAGE_MAP()
+};
+

+ 12 - 0
IDE/IDE/Graph.cpp

@@ -0,0 +1,12 @@
+#include "stdafx.h"
+#include "Graph.h"
+
+
+CGraph::CGraph()
+{
+}
+
+
+CGraph::~CGraph()
+{
+}

+ 8 - 0
IDE/IDE/Graph.h

@@ -0,0 +1,8 @@
+#pragma once
+class CGraph
+{
+public:
+	CGraph();
+	~CGraph();
+};
+

+ 253 - 0
IDE/IDE/IDE.cpp

@@ -0,0 +1,253 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+// IDE.cpp: 定义应用程序的类行为。
+//
+
+#include "stdafx.h"
+#include "afxwinappex.h"
+#include "afxdialogex.h"
+#include "IDE.h"
+#include "MainFrm.h"
+
+#include "IDEDoc.h"
+#include "IDEView.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+// CIDEApp
+
+BEGIN_MESSAGE_MAP(CIDEApp, CWinAppEx)
+	ON_COMMAND(ID_APP_ABOUT, &CIDEApp::OnAppAbout)
+	// 基于文件的标准文档命令
+	//ON_COMMAND(ID_FILE_NEW, &CWinAppEx::OnFileNew)
+	//ON_COMMAND(ID_FILE_OPEN, &CWinAppEx::OnFileOpen)
+	// 标准打印设置命令
+	ON_COMMAND(ID_FILE_PRINT_SETUP, &CWinAppEx::OnFilePrintSetup)
+	ON_COMMAND(ID_FILE_NEW, &CIDEApp::OnFileNew)
+	ON_COMMAND(ID_FILE_OPEN, &CIDEApp::OnFileOpen)
+END_MESSAGE_MAP()
+
+
+// CIDEApp 构造
+
+CIDEApp::CIDEApp() noexcept
+{
+	m_bHiColorIcons = TRUE;
+
+	// 支持重新启动管理器
+	m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_ALL_ASPECTS;
+#ifdef _MANAGED
+	// 如果应用程序是利用公共语言运行时支持(/clr)构建的,则: 
+	//     1) 必须有此附加设置,“重新启动管理器”支持才能正常工作。
+	//     2) 在您的项目中,您必须按照生成顺序向 System.Windows.Forms 添加引用。
+	System::Windows::Forms::Application::SetUnhandledExceptionMode(System::Windows::Forms::UnhandledExceptionMode::ThrowException);
+#endif
+
+	// TODO: 将以下应用程序 ID 字符串替换为唯一的 ID 字符串;建议的字符串格式
+	//为 CompanyName.ProductName.SubProduct.VersionInformation
+	SetAppID(_T("IDE.AppID.NoVersion"));
+
+	// TODO: 在此处添加构造代码,
+	// 将所有重要的初始化放置在 InitInstance 中
+}
+
+// 唯一的 CIDEApp 对象
+
+CIDEApp theApp;
+
+
+// CIDEApp 初始化
+
+BOOL CIDEApp::InitInstance()
+{
+	// 如果一个运行在 Windows XP 上的应用程序清单指定要
+	// 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
+	//则需要 InitCommonControlsEx()。  否则,将无法创建窗口。
+	INITCOMMONCONTROLSEX InitCtrls;
+	InitCtrls.dwSize = sizeof(InitCtrls);
+	// 将它设置为包括所有要在应用程序中使用的
+	// 公共控件类。
+	InitCtrls.dwICC = ICC_WIN95_CLASSES;
+	InitCommonControlsEx(&InitCtrls);
+
+	CWinAppEx::InitInstance();
+
+	// START GDI+ SUB SYSTEM
+	GdiplusStartup(&m_gdiplusToken, &m_gdiplusStartupInput, NULL);
+
+	// 初始化 OLE 库
+	if (!AfxOleInit())
+	{
+		AfxMessageBox(IDP_OLE_INIT_FAILED);
+		return FALSE;
+	}
+
+	AfxEnableControlContainer();
+
+	EnableTaskbarInteraction(FALSE);
+
+	// 使用 RichEdit 控件需要 AfxInitRichEdit2()
+	// AfxInitRichEdit2();
+
+	// 标准初始化
+	// 如果未使用这些功能并希望减小
+	// 最终可执行文件的大小,则应移除下列
+	// 不需要的特定初始化例程
+	// 更改用于存储设置的注册表项
+	// TODO: 应适当修改该字符串,
+	// 例如修改为公司或组织名
+	SetRegistryKey(_T("应用程序向导生成的本地应用程序"));
+	LoadStdProfileSettings(4);  // 加载标准 INI 文件选项(包括 MRU)
+
+
+	InitContextMenuManager();
+	InitShellManager();
+
+	InitKeyboardManager();
+
+	InitTooltipManager();
+	CMFCToolTipInfo ttParams;
+	ttParams.m_bVislManagerTheme = TRUE;
+	theApp.GetTooltipManager()->SetTooltipParams(AFX_TOOLTIP_TYPE_ALL,
+		RUNTIME_CLASS(CMFCToolTipCtrl), &ttParams);
+
+	// 注册应用程序的文档模板。  文档模板
+	// 将用作文档、框架窗口和视图之间的连接
+	CSingleDocTemplate* pDocTemplate;
+	pDocTemplate = new CSingleDocTemplate(
+		IDR_MAINFRAME,
+		RUNTIME_CLASS(CIDEDoc),
+		RUNTIME_CLASS(CMainFrame),       // 主 SDI 框架窗口
+		RUNTIME_CLASS(CIDEView));
+	if (!pDocTemplate)
+		return FALSE;
+	AddDocTemplate(pDocTemplate);
+
+
+	// 分析标准 shell 命令、DDE、打开文件操作的命令行
+	CCommandLineInfo cmdInfo;
+	ParseCommandLine(cmdInfo);
+
+
+
+	// 调度在命令行中指定的命令。  如果
+	// 用 /RegServer、/Register、/Unregserver 或 /Unregister 启动应用程序,则返回 FALSE。
+	if (!ProcessShellCommand(cmdInfo))
+		return FALSE;
+
+	// 唯一的一个窗口已初始化,因此显示它并对其进行更新
+	m_pMainWnd->ShowWindow(SW_SHOW);
+	m_pMainWnd->UpdateWindow();
+	return TRUE;
+}
+
+int CIDEApp::ExitInstance()
+{
+	//TODO: 处理可能已添加的附加资源
+	AfxOleTerm(FALSE);
+	// Shutdown GDI+ subystem
+	GdiplusShutdown(m_gdiplusToken);
+
+	return CWinAppEx::ExitInstance();
+}
+
+// CIDEApp 消息处理程序
+
+
+// 用于应用程序“关于”菜单项的 CAboutDlg 对话框
+
+class CAboutDlg : public CDialogEx
+{
+public:
+	CAboutDlg() noexcept;
+
+// 对话框数据
+#ifdef AFX_DESIGN_TIME
+	enum { IDD = IDD_ABOUTBOX };
+#endif
+
+protected:
+	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持
+
+// 实现
+protected:
+	DECLARE_MESSAGE_MAP()
+};
+
+CAboutDlg::CAboutDlg() noexcept : CDialogEx(IDD_ABOUTBOX)
+{
+}
+
+void CAboutDlg::DoDataExchange(CDataExchange* pDX)
+{
+	CDialogEx::DoDataExchange(pDX);
+}
+
+BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx)
+END_MESSAGE_MAP()
+
+// 用于运行对话框的应用程序命令
+void CIDEApp::OnAppAbout()
+{
+	CAboutDlg aboutDlg;
+	aboutDlg.DoModal();
+}
+
+// CIDEApp 自定义加载/保存方法
+
+void CIDEApp::PreLoadState()
+{
+	BOOL bNameValid;
+	CString strName;
+	bNameValid = strName.LoadString(IDS_EDIT_MENU);
+	ASSERT(bNameValid);
+	GetContextMenuManager()->AddMenu(strName, IDR_POPUP_EDIT);
+	bNameValid = strName.LoadString(IDS_EXPLORER);
+	ASSERT(bNameValid);
+	GetContextMenuManager()->AddMenu(strName, IDR_POPUP_EXPLORER);
+}
+
+void CIDEApp::LoadCustomState()
+{
+}
+
+void CIDEApp::SaveCustomState()
+{
+}
+
+// CIDEApp 消息处理程序
+
+
+
+
+
+void CIDEApp::OnFileNew()
+{
+	// TODO: 在此添加命令处理程序代码
+#ifdef _DEBUG
+	OutputDebugString(_T("重载OnFileNew函数"));
+#endif
+	CWinAppEx::OnFileNew();
+}
+
+
+void CIDEApp::OnFileOpen()
+{
+	// TODO: 在此添加命令处理程序代码
+#ifdef _DEBUG
+	AfxMessageBox(_T("重载OnFileOpen函数"));
+#endif
+	CWinAppEx::OnFileOpen();
+}

+ 55 - 0
IDE/IDE/IDE.h

@@ -0,0 +1,55 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+// IDE.h: IDE 应用程序的主头文件
+//
+#pragma once
+
+#ifndef __AFXWIN_H__
+	#error "在包含此文件之前包含“stdafx.h”以生成 PCH 文件"
+#endif
+
+#include "resource.h"       // 主符号
+
+
+// CIDEApp:
+// 有关此类的实现,请参阅 IDE.cpp
+//
+
+class CIDEApp : public CWinAppEx
+{
+public:
+	CIDEApp() noexcept;
+
+	// GDI+
+	GdiplusStartupInput		m_gdiplusStartupInput;
+	ULONG_PTR				m_gdiplusToken;
+
+// 重写
+public:
+	virtual BOOL InitInstance();
+	virtual int ExitInstance();
+
+// 实现
+	UINT  m_nAppLook;
+	BOOL  m_bHiColorIcons;
+
+	virtual void PreLoadState();
+	virtual void LoadCustomState();
+	virtual void SaveCustomState();
+
+	afx_msg void OnAppAbout();
+	DECLARE_MESSAGE_MAP()
+	afx_msg void OnFileNew();
+	afx_msg void OnFileOpen();
+};
+
+extern CIDEApp theApp;

BIN
IDE/IDE/IDE.rc


+ 288 - 0
IDE/IDE/IDE.vcxproj

@@ -0,0 +1,288 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <VCProjectVersion>15.0</VCProjectVersion>
+    <ProjectGuid>{77608216-0D0C-45C2-94DC-DD2E4F6E5DF0}</ProjectGuid>
+    <Keyword>MFCProj</Keyword>
+    <RootNamespace>IDE</RootNamespace>
+    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <CharacterSet>MultiByte</CharacterSet>
+    <UseOfMfc>Dynamic</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>MultiByte</CharacterSet>
+    <UseOfMfc>Dynamic</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <CharacterSet>MultiByte</CharacterSet>
+    <UseOfMfc>Dynamic</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>MultiByte</CharacterSet>
+    <UseOfMfc>Dynamic</UseOfMfc>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="Shared">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+    <OutDir>..\..\..\bin\$(ProjectName)\</OutDir>
+    <IntDir>$(OutDir)$(Configuration)\</IntDir>
+    <TargetName>$(ProjectName)_D</TargetName>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <IncludePath>D:\Program Files\Opencv\include;D:\Program Files\Opencv\include\opencv2;$(IncludePath)</IncludePath>
+    <LibraryPath>D:\Program Files\Opencv\lib\Debug;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>..\..\..\bin\$(ProjectName)\</OutDir>
+    <IntDir>$(OutDir)$(Configuration)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <SDLCheck>true</SDLCheck>
+      <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\include</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <AdditionalLibraryDirectories>..\lib\Debug\</AdditionalLibraryDirectories>
+      <AdditionalDependencies>opencv_core342d.lib;opencv_imgproc342d.lib;opencv_highgui342d.lib;opencv_ml342d.lib;opencv_video342d.lib;opencv_features2d342d.lib;opencv_calib3d342d.lib;opencv_objdetect342d.lib;opencv_flann342d.lib;opencv_dnn342d.lib;opencv_imgcodecs342d.lib;opencv_photo342d.lib;opencv_shape342d.lib;opencv_stitching342d.lib;opencv_superres342d.lib;opencv_videoio342d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+    <Midl>
+      <MkTypLibCompatible>false</MkTypLibCompatible>
+      <ValidateAllParameters>true</ValidateAllParameters>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </Midl>
+    <ResourceCompile>
+      <Culture>0x0804</Culture>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <SDLCheck>true</SDLCheck>
+      <PreprocessorDefinitions>_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <AdditionalDependencies>opencv_calib3d470d.lib;opencv_core470d.lib;opencv_dnn470d.lib;opencv_features2d470d.lib;opencv_flann470d.lib;opencv_gapi470d.lib;opencv_highgui470d.lib;opencv_imgcodecs470d.lib;opencv_imgproc470d.lib;opencv_ml470d.lib;opencv_objdetect470d.lib;opencv_photo470d.lib;opencv_stitching470d.lib;opencv_ts470d.lib;opencv_video470d.lib;opencv_videoio470d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+    <Midl>
+      <MkTypLibCompatible>false</MkTypLibCompatible>
+      <ValidateAllParameters>true</ValidateAllParameters>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </Midl>
+    <ResourceCompile>
+      <Culture>0x0804</Culture>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <SDLCheck>true</SDLCheck>
+      <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>..\include</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalLibraryDirectories>..\lib\Release\</AdditionalLibraryDirectories>
+      <AdditionalDependencies>opencv_core342.lib;opencv_imgproc342.lib;opencv_highgui342.lib;opencv_ml342.lib;opencv_video342.lib;opencv_features2d342.lib;opencv_calib3d342.lib;opencv_objdetect342.lib;opencv_flann342.lib;opencv_dnn342.lib;opencv_imgcodecs342.lib;opencv_photo342.lib;opencv_shape342.lib;opencv_stitching342.lib;opencv_superres342.lib;opencv_videoio342.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+    <Midl>
+      <MkTypLibCompatible>false</MkTypLibCompatible>
+      <ValidateAllParameters>true</ValidateAllParameters>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </Midl>
+    <ResourceCompile>
+      <Culture>0x0804</Culture>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <SDLCheck>true</SDLCheck>
+      <PreprocessorDefinitions>_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>opencv_calib3d470.lib;opencv_core470.lib;opencv_dnn470.lib;opencv_features2d470.lib;opencv_flann470.lib;opencv_gapi470.lib;opencv_highgui470.lib;opencv_imgcodecs470.lib;opencv_imgproc470.lib;opencv_ml470.lib;opencv_objdetect470.lib;opencv_photo470.lib;opencv_stitching470.lib;opencv_ts470.lib;opencv_video470.lib;opencv_videoio470.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+    <Midl>
+      <MkTypLibCompatible>false</MkTypLibCompatible>
+      <ValidateAllParameters>true</ValidateAllParameters>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </Midl>
+    <ResourceCompile>
+      <Culture>0x0804</Culture>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="calendarbar.h" />
+    <ClInclude Include="CCompatibleDC.h" />
+    <ClInclude Include="ClassView.h" />
+    <ClInclude Include="DrawObj.h" />
+    <ClInclude Include="FileView.h" />
+    <ClInclude Include="Graph.h" />
+    <ClInclude Include="IDE.h" />
+    <ClInclude Include="IDEDoc.h" />
+    <ClInclude Include="IDEView.h" />
+    <ClInclude Include="MainFrm.h" />
+    <ClInclude Include="OutputWnd.h" />
+    <ClInclude Include="PropertiesWnd.h" />
+    <ClInclude Include="Resource.h" />
+    <ClInclude Include="stdafx.h" />
+    <ClInclude Include="targetver.h" />
+    <ClInclude Include="ViewTree.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="calendarbar.cpp" />
+    <ClCompile Include="CCompatibleDC.cpp" />
+    <ClCompile Include="ClassView.cpp" />
+    <ClCompile Include="DrawObj.cpp" />
+    <ClCompile Include="FileView.cpp" />
+    <ClCompile Include="Graph.cpp" />
+    <ClCompile Include="IDE.cpp" />
+    <ClCompile Include="IDEDoc.cpp" />
+    <ClCompile Include="IDEView.cpp" />
+    <ClCompile Include="MainFrm.cpp" />
+    <ClCompile Include="OutputWnd.cpp" />
+    <ClCompile Include="PropertiesWnd.cpp" />
+    <ClCompile Include="stdafx.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="ViewTree.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="IDE.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <Image Include="res\buttons.bmp" />
+    <Image Include="res\classview.bmp" />
+    <Image Include="res\classview_hc.bmp" />
+    <Image Include="res\class_view.ico" />
+    <Image Include="res\class_view_hc.ico" />
+    <Image Include="res\explorer.bmp" />
+    <Image Include="res\explorer_hc.bmp" />
+    <Image Include="res\filelarge.bmp" />
+    <Image Include="res\filesmall.bmp" />
+    <Image Include="res\fileview.bmp" />
+    <Image Include="res\fileview_hc.bmp" />
+    <Image Include="res\file_view.ico" />
+    <Image Include="res\file_view_hc.ico" />
+    <Image Include="res\IDE.ico" />
+    <Image Include="res\IDEDoc.ico" />
+    <Image Include="res\info.bmp" />
+    <Image Include="res\main.bmp" />
+    <Image Include="res\menuimages.bmp" />
+    <Image Include="res\menuimages_hc.bmp" />
+    <Image Include="res\nav_large.bmp" />
+    <Image Include="res\nav_large_hc.bmp" />
+    <Image Include="res\output_wnd.ico" />
+    <Image Include="res\output_wnd_hc.ico" />
+    <Image Include="res\pages.bmp" />
+    <Image Include="res\pages_hc.bmp" />
+    <Image Include="res\pages_small.bmp" />
+    <Image Include="res\pages_small_hc.bmp" />
+    <Image Include="res\properties.bmp" />
+    <Image Include="res\properties_hc.bmp" />
+    <Image Include="res\properties_wnd.ico" />
+    <Image Include="res\properties_wnd_hc.ico" />
+    <Image Include="res\sort.bmp" />
+    <Image Include="res\sort_hc.bmp" />
+    <Image Include="res\Toolbar.bmp" />
+    <Image Include="res\Toolbar256.bmp" />
+    <Image Include="res\writelarge.bmp" />
+    <Image Include="res\writesmall.bmp" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="res\IDE.rc2" />
+    <None Include="res\ribbon.mfcribbon-ms" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 240 - 0
IDE/IDE/IDE.vcxproj.filters

@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="源文件">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="头文件">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
+    </Filter>
+    <Filter Include="资源文件">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+    </Filter>
+    <Filter Include="Graph">
+      <UniqueIdentifier>{a5180597-d9de-484c-afba-a3a598d0acce}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="IDE.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="stdafx.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="targetver.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="MainFrm.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="IDEDoc.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="IDEView.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="Resource.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="FileView.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="ClassView.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="ViewTree.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="OutputWnd.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="PropertiesWnd.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="calendarbar.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="Graph.h">
+      <Filter>Graph</Filter>
+    </ClInclude>
+    <ClInclude Include="CCompatibleDC.h">
+      <Filter>Graph</Filter>
+    </ClInclude>
+    <ClInclude Include="DrawObj.h">
+      <Filter>Graph</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="IDE.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
+    <ClCompile Include="stdafx.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
+    <ClCompile Include="MainFrm.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
+    <ClCompile Include="IDEDoc.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
+    <ClCompile Include="IDEView.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
+    <ClCompile Include="FileView.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
+    <ClCompile Include="ClassView.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
+    <ClCompile Include="ViewTree.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
+    <ClCompile Include="OutputWnd.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
+    <ClCompile Include="PropertiesWnd.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
+    <ClCompile Include="calendarbar.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
+    <ClCompile Include="Graph.cpp">
+      <Filter>Graph</Filter>
+    </ClCompile>
+    <ClCompile Include="CCompatibleDC.cpp">
+      <Filter>Graph</Filter>
+    </ClCompile>
+    <ClCompile Include="DrawObj.cpp">
+      <Filter>Graph</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="IDE.rc">
+      <Filter>资源文件</Filter>
+    </ResourceCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <Image Include="res\file_view.ico">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\file_view_hc.ico">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\class_view.ico">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\class_view_hc.ico">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\fileview.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\fileview_hc.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\classview.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\classview_hc.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\explorer.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\explorer_hc.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\sort.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\sort_hc.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\menuimages.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\menuimages_hc.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\output_wnd.ico">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\output_wnd_hc.ico">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\properties_wnd.ico">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\properties_wnd_hc.ico">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\properties.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\properties_hc.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\nav_large.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\nav_large_hc.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\pages.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\pages_hc.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\pages_small.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\pages_small_hc.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\info.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\buttons.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\filelarge.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\filesmall.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\main.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\writelarge.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\writesmall.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\IDEDoc.ico">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\IDE.ico">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\Toolbar.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+    <Image Include="res\Toolbar256.bmp">
+      <Filter>资源文件</Filter>
+    </Image>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="res\ribbon.mfcribbon-ms">
+      <Filter>资源文件</Filter>
+    </None>
+    <None Include="res\IDE.rc2">
+      <Filter>资源文件</Filter>
+    </None>
+  </ItemGroup>
+</Project>

+ 147 - 0
IDE/IDE/IDEDoc.cpp

@@ -0,0 +1,147 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+// IDEDoc.cpp: CIDEDoc 类的实现
+//
+
+#include "stdafx.h"
+// SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的
+// ATL 项目中进行定义,并允许与该项目共享文档代码。
+#ifndef SHARED_HANDLERS
+#include "IDE.h"
+#endif
+
+#include "IDEDoc.h"
+
+#include <propkey.h>
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+// CIDEDoc
+
+IMPLEMENT_DYNCREATE(CIDEDoc, CDocument)
+
+BEGIN_MESSAGE_MAP(CIDEDoc, CDocument)
+END_MESSAGE_MAP()
+
+
+// CIDEDoc 构造/析构
+
+CIDEDoc::CIDEDoc() noexcept
+{
+	// TODO: 在此添加一次性构造代码
+
+}
+
+CIDEDoc::~CIDEDoc()
+{
+}
+
+BOOL CIDEDoc::OnNewDocument()
+{
+	if (!CDocument::OnNewDocument())
+		return FALSE;
+
+	// TODO: 在此添加重新初始化代码
+	// (SDI 文档将重用该文档)
+
+	return TRUE;
+}
+
+
+
+
+// CIDEDoc 序列化
+
+void CIDEDoc::Serialize(CArchive& ar)
+{
+	if (ar.IsStoring())
+	{
+		// TODO: 在此添加存储代码
+	}
+	else
+	{
+		// TODO: 在此添加加载代码
+	}
+}
+
+#ifdef SHARED_HANDLERS
+
+// 缩略图的支持
+void CIDEDoc::OnDrawThumbnail(CDC& dc, LPRECT lprcBounds)
+{
+	// 修改此代码以绘制文档数据
+	dc.FillSolidRect(lprcBounds, RGB(255, 255, 255));
+
+	CString strText = _T("TODO: implement thumbnail drawing here");
+	LOGFONT lf;
+
+	CFont* pDefaultGUIFont = CFont::FromHandle((HFONT) GetStockObject(DEFAULT_GUI_FONT));
+	pDefaultGUIFont->GetLogFont(&lf);
+	lf.lfHeight = 36;
+
+	CFont fontDraw;
+	fontDraw.CreateFontIndirect(&lf);
+
+	CFont* pOldFont = dc.SelectObject(&fontDraw);
+	dc.DrawText(strText, lprcBounds, DT_CENTER | DT_WORDBREAK);
+	dc.SelectObject(pOldFont);
+}
+
+// 搜索处理程序的支持
+void CIDEDoc::InitializeSearchContent()
+{
+	CString strSearchContent;
+	// 从文档数据设置搜索内容。
+	// 内容部分应由“;”分隔
+
+	// 例如:     strSearchContent = _T("point;rectangle;circle;ole object;");
+	SetSearchContent(strSearchContent);
+}
+
+void CIDEDoc::SetSearchContent(const CString& value)
+{
+	if (value.IsEmpty())
+	{
+		RemoveChunk(PKEY_Search_Contents.fmtid, PKEY_Search_Contents.pid);
+	}
+	else
+	{
+		CMFCFilterChunkValueImpl *pChunk = nullptr;
+		ATLTRY(pChunk = new CMFCFilterChunkValueImpl);
+		if (pChunk != nullptr)
+		{
+			pChunk->SetTextValue(PKEY_Search_Contents, value, CHUNK_TEXT);
+			SetChunkValue(pChunk);
+		}
+	}
+}
+
+#endif // SHARED_HANDLERS
+
+// CIDEDoc 诊断
+
+#ifdef _DEBUG
+void CIDEDoc::AssertValid() const
+{
+	CDocument::AssertValid();
+}
+
+void CIDEDoc::Dump(CDumpContext& dc) const
+{
+	CDocument::Dump(dc);
+}
+#endif //_DEBUG
+
+
+// CIDEDoc 命令

+ 58 - 0
IDE/IDE/IDEDoc.h

@@ -0,0 +1,58 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+// IDEDoc.h: CIDEDoc 类的接口
+//
+
+
+#pragma once
+
+
+class CIDEDoc : public CDocument
+{
+protected: // 仅从序列化创建
+	CIDEDoc() noexcept;
+	DECLARE_DYNCREATE(CIDEDoc)
+
+// 特性
+public:
+
+// 操作
+public:
+
+// 重写
+public:
+	virtual BOOL OnNewDocument();
+	virtual void Serialize(CArchive& ar);
+#ifdef SHARED_HANDLERS
+	virtual void InitializeSearchContent();
+	virtual void OnDrawThumbnail(CDC& dc, LPRECT lprcBounds);
+#endif // SHARED_HANDLERS
+
+// 实现
+public:
+	virtual ~CIDEDoc();
+#ifdef _DEBUG
+	virtual void AssertValid() const;
+	virtual void Dump(CDumpContext& dc) const;
+#endif
+
+protected:
+
+// 生成的消息映射函数
+protected:
+	DECLARE_MESSAGE_MAP()
+
+#ifdef SHARED_HANDLERS
+	// 用于为搜索处理程序设置搜索内容的 Helper 函数
+	void SetSearchContent(const CString& value);
+#endif // SHARED_HANDLERS
+};

+ 364 - 0
IDE/IDE/IDEView.cpp

@@ -0,0 +1,364 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+// IDEView.cpp: CIDEView 类的实现
+//
+
+#include "stdafx.h"
+// SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的
+// ATL 项目中进行定义,并允许与该项目共享文档代码。
+#ifndef SHARED_HANDLERS
+#include "IDE.h"
+#endif
+
+#include "IDEDoc.h"
+#include "IDEView.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+// CIDEView
+
+IMPLEMENT_DYNCREATE(CIDEView, CScrollView)
+
+BEGIN_MESSAGE_MAP(CIDEView, CScrollView)
+	// 标准打印命令
+	ON_COMMAND(ID_FILE_PRINT, &CScrollView::OnFilePrint)
+	ON_COMMAND(ID_FILE_PRINT_DIRECT, &CScrollView::OnFilePrint)
+	ON_COMMAND(ID_FILE_PRINT_PREVIEW, &CIDEView::OnFilePrintPreview)
+	ON_WM_CONTEXTMENU()
+	ON_WM_RBUTTONUP()
+END_MESSAGE_MAP()
+
+// CIDEView 构造/析构
+
+CIDEView::CIDEView() noexcept
+{
+	// TODO: 在此处添加构造代码
+
+}
+
+CIDEView::~CIDEView()
+{
+}
+
+BOOL CIDEView::PreCreateWindow(CREATESTRUCT& cs)
+{
+	// TODO: 在此处通过修改
+	//  CREATESTRUCT cs 来修改窗口类或样式
+
+	return CScrollView::PreCreateWindow(cs);
+}
+
+// CIDEView 绘图
+
+void CIDEView::OnDraw(CDC* pDC)
+{
+	CIDEDoc* pDoc = GetDocument();
+	ASSERT_VALID(pDoc);
+	if (!pDoc)
+		return;
+
+ 	if (m_img.data != NULL)
+ 		DrawImage(m_img, pDC);
+	//DrawGrid(pDC);
+	// TODO: 在此处为本机数据添加绘制代码
+}
+
+void CIDEView::DrawMat(Mat & img, CDC *pDC)
+{
+	if (img.data == NULL)
+		return;
+
+	CRect rc;
+	Mat imgTmp;
+	// 获取控件大小;
+	GetClientRect(rc);
+	// 按控件大小,缩小或放大图片;
+	cv::resize(img, imgTmp, cv::Size(rc.Width(), rc.Height()));
+	//img.copyTo(imgTmp);
+
+	// 转换格式;
+	switch (imgTmp.channels())
+	{
+	case 1:
+		cv::cvtColor(imgTmp, imgTmp, COLOR_GRAY2BGRA);
+		break;
+	case 3:
+		cv::cvtColor(imgTmp, imgTmp, COLOR_BGR2BGRA);
+		break;
+	default:
+		break;
+	}
+
+	int pixelBytes = imgTmp.channels()*(imgTmp.depth() + 1); // 计算一个像素多少个字节
+	// 制作bitmapinfo(数据头);
+	BITMAPINFO bitInfo;
+	bitInfo.bmiHeader.biBitCount = 8 * pixelBytes;
+	bitInfo.bmiHeader.biWidth = imgTmp.cols;
+	bitInfo.bmiHeader.biHeight = -imgTmp.rows;
+	bitInfo.bmiHeader.biPlanes = 1;
+	bitInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+	bitInfo.bmiHeader.biCompression = BI_RGB;
+	bitInfo.bmiHeader.biClrImportant = 0;
+	bitInfo.bmiHeader.biClrUsed = 0;
+	bitInfo.bmiHeader.biSizeImage = 0;
+	bitInfo.bmiHeader.biXPelsPerMeter = 0;
+	bitInfo.bmiHeader.biYPelsPerMeter = 0;
+
+	// 双缓存;
+	CDC MemDC; //首先定义一个显示设备对象
+	CBitmap MemBitmap;//定义一个位图对象
+
+	//随后建立与屏幕显示兼容的内存显示设备
+	MemDC.CreateCompatibleDC(NULL);
+	//这时还不能绘图,因为没有地方画 ^_^
+	//下面建立一个与屏幕显示兼容的位图,至于位图的大小嘛,可以用窗口的大小
+	MemBitmap.CreateCompatibleBitmap(pDC, rc.Width(), rc.Height());
+
+	//将位图选入到内存显示设备中
+	//只有选入了位图的内存显示设备才有地方绘图,画到指定的位图上
+	CBitmap *pOldBit = MemDC.SelectObject(&MemBitmap);
+
+	//先用背景色将位图清除干净,这里我用的是白色作为背景
+	//你也可以用自己应该用的颜色
+	MemDC.FillSolidRect(0, 0, rc.Width(), rc.Height(), RGB(255, 255, 255));
+	// Mat.data + bitmap数据头 -> MFC
+	int nRet = ::StretchDIBits(
+		MemDC,
+		0, 0, rc.Width(), rc.Height(),
+		0, 0, rc.Width(), rc.Height(),
+		imgTmp.data,
+		&bitInfo,
+		DIB_RGB_COLORS,
+		SRCCOPY
+	);
+
+	//将内存中的图拷贝到屏幕上进行显示
+	pDC->BitBlt(0, 0, rc.Width(), rc.Height(), &MemDC, 0, 0, SRCCOPY);
+
+	//绘图完成后的清理
+	MemBitmap.DeleteObject();
+	MemDC.DeleteDC();
+}
+
+void CIDEView::DrawGrid(CDC * pDC)
+{
+	// 获取客户区域;
+	CRect rect;
+	GetClientRect(&rect);
+	
+	// 备份北背色;
+	COLORREF oldBkColor = pDC->GetBkColor();
+	COLORREF gridColor = RGB(200,200,200);
+	// Center lines
+	CPen penDash;
+	penDash.CreatePen(PS_DASH, 1, gridColor);
+	CPen* pOldPen = pDC->SelectObject(&penDash);
+
+	pDC->MoveTo(0, rect.top);
+	pDC->LineTo(0, rect.bottom);
+	pDC->MoveTo(rect.left, 0);
+	pDC->LineTo(rect.right, 0);
+
+	// Major unit lines
+	CPen penDot;
+	penDot.CreatePen(PS_DOT, 1, gridColor);
+	pDC->SelectObject(&penDot);
+
+	//for (int x = rect.left / 100 * 100; x < rect.right; x += 100)
+	for (int x = rect.left / 50 * 50; x < rect.right; x += 50)
+	{
+		if (x != 0)
+		{
+			pDC->MoveTo(x, rect.top);
+			pDC->LineTo(x, rect.bottom);
+		}
+	}
+
+	//for (int y = rect.top / 100 * 100; y < rect.bottom; y += 100)
+	for (int y = rect.top / 50 * 50; y < rect.bottom; y += 50)
+	{
+		if (y != 0)
+		{
+			pDC->MoveTo(rect.left, y);
+			pDC->LineTo(rect.right, y);
+		}
+	}
+
+	// Outlines
+	CPen penSolid;
+	penSolid.CreatePen(PS_SOLID, 1, gridColor);
+	pDC->SelectObject(&penSolid);
+	pDC->MoveTo(rect.left, rect.top);
+	pDC->LineTo(rect.right, rect.top);
+	pDC->LineTo(rect.right, rect.bottom);
+	pDC->LineTo(rect.left, rect.bottom);
+	pDC->LineTo(rect.left, rect.top);
+
+	pDC->SelectObject(pOldPen);
+	pDC->SetBkColor(oldBkColor);
+}
+
+void CIDEView::DrawImage(Mat & img, CDC * pDC)
+{
+	if (img.data == NULL)
+		return;
+
+	CRect rc;
+	Mat imgTmp;
+	// 获取控件大小;
+	GetClientRect(rc);
+	// 按控件大小,缩小或放大图片;
+	//cv::resize(img, imgTmp, cv::Size(rc.Width(), rc.Height()));
+	img.copyTo(imgTmp);
+
+	// 转换格式;
+	switch (imgTmp.channels())
+	{
+	case 1:
+		cv::cvtColor(imgTmp, imgTmp, COLOR_GRAY2BGRA);
+		break;
+	case 3:
+		cv::cvtColor(imgTmp, imgTmp, COLOR_BGR2BGRA);
+		break;
+	default:
+		break;
+	}
+
+	// gdi+双缓存;
+#if 1
+	Bitmap bmp(imgTmp.cols, imgTmp.rows, imgTmp.step1(), PixelFormat32bppARGB, imgTmp.data);
+
+	Graphics bmpGraphics(&bmp);
+	bmpGraphics.SetSmoothingMode(SmoothingModeAntiAlias);
+	// 画布颜色;
+	//SolidBrush bkBrush(Color(0, 0, 0));
+	//bmpGraphics.FillRectangle(&bkBrush, 0, 0, rc.Width(), rc.Height());
+
+	// 在DC上画;
+	Graphics graphDC(pDC->GetSafeHdc());
+	CachedBitmap cachedBmp(&bmp, &graphDC);
+	graphDC.DrawCachedBitmap(&cachedBmp, 0, 0);
+#else
+	Graphics graphDC(pDC->GetSafeHdc());
+	Gdiplus::Bitmap bitmap(imgTmp.cols, imgTmp.rows, imgTmp.step1(), PixelFormat32bppARGB, imgTmp.data);
+	graphDC.DrawImage(&bitmap, Gdiplus::Rect(rc.left, rc.top, rc.Width(), rc.Height()));
+#endif
+}
+
+void CIDEView::OnInitialUpdate()
+{
+	CScrollView::OnInitialUpdate();
+
+	m_img = imread(_T("IDE.png"), IMREAD_COLOR);
+
+	// 设置滚动条出现时的范围;
+	CSize sizeTotal = CSize(m_img.cols, m_img.rows);
+	//sizeTotal.cx = sizeTotal.cy = 100;
+	//CSize sizePage = CSize(m_img.cols, m_img.rows);
+	CSize sizePage = CSize(200, 200);
+	CSize sizeLine = CSize(10, 10);
+	SetScrollSizes(MM_TEXT, sizeTotal, sizePage, sizeLine);//单伴:MM_TEXT像素;
+}
+
+
+// CIDEView 打印
+
+
+void CIDEView::OnFilePrintPreview()
+{
+#ifndef SHARED_HANDLERS
+	AFXPrintPreview(this);
+#endif
+}
+
+BOOL CIDEView::OnPreparePrinting(CPrintInfo* pInfo)
+{
+	// 默认准备
+	return DoPreparePrinting(pInfo);
+}
+
+void CIDEView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
+{
+	// TODO: 添加额外的打印前进行的初始化过程
+}
+
+void CIDEView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
+{
+	// TODO: 添加打印后进行的清理过程
+}
+
+void CIDEView::OnRButtonUp(UINT /* nFlags */, CPoint point)
+{
+	ClientToScreen(&point);
+	OnContextMenu(this, point);
+}
+
+void CIDEView::OnContextMenu(CWnd* /* pWnd */, CPoint point)
+{
+#ifndef SHARED_HANDLERS
+	theApp.GetContextMenuManager()->ShowPopupMenu(IDR_POPUP_EDIT, point.x, point.y, this, TRUE);
+#endif
+}
+
+
+// CIDEView 诊断
+
+#ifdef _DEBUG
+void CIDEView::AssertValid() const
+{
+	CScrollView::AssertValid();
+}
+
+void CIDEView::Dump(CDumpContext& dc) const
+{
+	CScrollView::Dump(dc);
+}
+
+CIDEDoc* CIDEView::GetDocument() const // 非调试版本是内联的
+{
+	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CIDEDoc)));
+	return (CIDEDoc*)m_pDocument;
+}
+#endif //_DEBUG
+
+
+// CIDEView 消息处理程序
+
+
+void CIDEView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo)
+{
+	// TODO: 在此添加专用代码和/或调用基类
+	CScrollView::OnPrepareDC(pDC, pInfo);
+	// mapping mode is MM_ANISOTROPIC
+	// these extents setup a mode similar to MM_LOENGLISH
+	// MM_LOENGLISH is in .01 physical inches
+	// these extents provide .01 logical inches
+
+#if 0
+	pDC->SetMapMode(MM_ANISOTROPIC);
+	pDC->SetViewportExt(pDC->GetDeviceCaps(LOGPIXELSX),
+		pDC->GetDeviceCaps(LOGPIXELSY));
+	pDC->SetWindowExt(100, -100);
+
+	// set the origin of the coordinate system to the center of the page
+	CPoint ptOrg;
+	
+	ptOrg.x = GetDocument()->GetSize().cx / 2;
+	ptOrg.y = GetDocument()->GetSize().cy / 2;
+
+	// ptOrg is in logical coordinates
+	pDC->OffsetWindowOrg(-ptOrg.x, ptOrg.y);
+#endif
+}

+ 69 - 0
IDE/IDE/IDEView.h

@@ -0,0 +1,69 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+// IDEView.h: CIDEView 类的接口
+//
+
+#pragma once
+
+
+class CIDEView : public CScrollView
+{
+protected: // 仅从序列化创建
+	CIDEView() noexcept;
+	DECLARE_DYNCREATE(CIDEView)
+
+// 特性
+public:
+	CIDEDoc* GetDocument() const;
+
+	Mat	m_img;
+	void DrawMat(Mat & img, CDC *pDC);
+	void DrawGrid(CDC *pDC);
+	void DrawImage(Mat & img, CDC *pDC);
+// 操作
+public:
+
+// 重写
+public:
+	virtual void OnDraw(CDC* pDC);  // 重写以绘制该视图
+	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
+protected:
+	virtual void OnInitialUpdate(); // 构造后第一次调用
+	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
+	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
+	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
+
+// 实现
+public:
+	virtual ~CIDEView();
+#ifdef _DEBUG
+	virtual void AssertValid() const;
+	virtual void Dump(CDumpContext& dc) const;
+#endif
+
+protected:
+
+// 生成的消息映射函数
+protected:
+	afx_msg void OnFilePrintPreview();
+	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
+	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
+	DECLARE_MESSAGE_MAP()
+public:
+	virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
+};
+
+#ifndef _DEBUG  // IDEView.cpp 中的调试版本
+inline CIDEDoc* CIDEView::GetDocument() const
+   { return reinterpret_cast<CIDEDoc*>(m_pDocument); }
+#endif
+

+ 594 - 0
IDE/IDE/MainFrm.cpp

@@ -0,0 +1,594 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+// MainFrm.cpp: CMainFrame 类的实现
+//
+
+#include "stdafx.h"
+#include "IDE.h"
+
+#include "MainFrm.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+// CMainFrame
+
+IMPLEMENT_DYNCREATE(CMainFrame, CFrameWndEx)
+
+BEGIN_MESSAGE_MAP(CMainFrame, CFrameWndEx)
+	ON_WM_CREATE()
+	ON_COMMAND_RANGE(ID_VIEW_APPLOOK_WIN_2000, ID_VIEW_APPLOOK_WINDOWS_7, &CMainFrame::OnApplicationLook)
+	ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_APPLOOK_WIN_2000, ID_VIEW_APPLOOK_WINDOWS_7, &CMainFrame::OnUpdateApplicationLook)
+	ON_COMMAND(ID_VIEW_CLASS_BAR, &CMainFrame::OnClassViewCaptionBar)
+	ON_UPDATE_COMMAND_UI(ID_VIEW_CLASS_BAR, &CMainFrame::OnUpdateClassViewCaptionBar)
+	ON_COMMAND(ID_TOOLS_OPTIONS, &CMainFrame::OnOptions)
+	ON_COMMAND(ID_VIEW_FILEVIEW, &CMainFrame::OnViewFileView)
+	ON_UPDATE_COMMAND_UI(ID_VIEW_FILEVIEW, &CMainFrame::OnUpdateViewFileView)
+	ON_COMMAND(ID_VIEW_CLASSVIEW, &CMainFrame::OnViewClassView)
+	ON_UPDATE_COMMAND_UI(ID_VIEW_CLASSVIEW, &CMainFrame::OnUpdateViewClassView)
+	ON_COMMAND(ID_VIEW_OUTPUTWND, &CMainFrame::OnViewOutputWindow)
+	ON_UPDATE_COMMAND_UI(ID_VIEW_OUTPUTWND, &CMainFrame::OnUpdateViewOutputWindow)
+	ON_COMMAND(ID_VIEW_PROPERTIESWND, &CMainFrame::OnViewPropertiesWindow)
+	ON_UPDATE_COMMAND_UI(ID_VIEW_PROPERTIESWND, &CMainFrame::OnUpdateViewPropertiesWindow)
+	ON_COMMAND(ID_FILE_PRINT, &CMainFrame::OnFilePrint)
+	ON_COMMAND(ID_FILE_PRINT_DIRECT, &CMainFrame::OnFilePrint)
+	ON_COMMAND(ID_FILE_PRINT_PREVIEW, &CMainFrame::OnFilePrintPreview)
+	ON_UPDATE_COMMAND_UI(ID_FILE_PRINT_PREVIEW, &CMainFrame::OnUpdateFilePrintPreview)
+	ON_WM_SETTINGCHANGE()
+	ON_WM_GETMINMAXINFO()
+	ON_COMMAND(ID_VIEW_FILE_BAR, &CMainFrame::OnViewFileBar)
+	ON_UPDATE_COMMAND_UI(ID_VIEW_FILE_BAR, &CMainFrame::OnUpdateViewFileBar)
+	ON_COMMAND(ID_VIEW_PROPERTY_BAR, &CMainFrame::OnViewPropertyBar)
+	ON_UPDATE_COMMAND_UI(ID_VIEW_PROPERTY_BAR, &CMainFrame::OnUpdateViewPropertyBar)
+	ON_COMMAND(ID_VIEW_OUTPUT_BAR, &CMainFrame::OnViewOutputBar)
+	ON_UPDATE_COMMAND_UI(ID_VIEW_OUTPUT_BAR, &CMainFrame::OnUpdateViewOutputBar)
+END_MESSAGE_MAP()
+
+// CMainFrame 构造/析构
+
+CMainFrame::CMainFrame() noexcept
+{
+	// TODO: 在此添加成员初始化代码
+	theApp.m_nAppLook = theApp.GetInt(_T("ApplicationLook"), ID_VIEW_APPLOOK_VS_2008);
+}
+
+CMainFrame::~CMainFrame()
+{
+}
+
+int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
+{
+	if (CFrameWndEx::OnCreate(lpCreateStruct) == -1)
+		return -1;
+
+	BOOL bNameValid;
+
+	m_wndRibbonBar.Create(this);
+	m_wndRibbonBar.LoadFromResource(IDR_RIBBON);
+#if !__QUICKACCESS_COMMAND__
+	CMFCRibbonQuickAccessToolBar* pQAToolbar = m_wndRibbonBar.GetQuickAccessToolbar();
+	pQAToolbar->RemoveAll();
+#endif
+
+	if (!m_wndStatusBar.Create(this))
+	{
+		TRACE0("未能创建状态栏\n");
+		return -1;      // 未能创建
+	}
+
+	CString strTitlePane1;
+	CString strTitlePane2;
+	bNameValid = strTitlePane1.LoadString(IDS_STATUS_PANE1);
+	ASSERT(bNameValid);
+	bNameValid = strTitlePane2.LoadString(IDS_STATUS_PANE2);
+	ASSERT(bNameValid);
+	m_wndStatusBar.AddElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_PANE1, strTitlePane1, TRUE), strTitlePane1);
+	m_wndStatusBar.AddExtendedElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_PANE2, strTitlePane2, TRUE), strTitlePane2);
+
+	// 启用 Visual Studio 2005 样式停靠窗口行为
+	CDockingManager::SetDockingMode(DT_SMART);
+	// 启用 Visual Studio 2005 样式停靠窗口自动隐藏行为
+	EnableAutoHidePanes(CBRS_ALIGN_ANY);
+
+#if __OUTLOOKBAR__
+	// 导航窗格将创建在左侧,因此将暂时禁用左侧的停靠:
+	EnableDocking(CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM | CBRS_ALIGN_RIGHT);
+
+	// 创建并设置“Outlook”导航栏: 
+	if (!CreateOutlookBar(m_wndNavigationBar, ID_VIEW_NAVIGATION, m_wndTree, m_wndCalendar, 250))
+	{
+		TRACE0("未能创建导航窗格\n");
+		return -1;      // 未能创建
+	}
+#endif
+
+#if __CAPTIONBAR__
+	// 创建标题栏: 
+	if (!CreateCaptionBar())
+	{
+		TRACE0("未能创建标题栏\n");
+		return -1;      // 未能创建
+	}
+#endif
+
+#if __OUTLOOKBAR__
+	// 已创建 Outlook 栏,应允许在左侧停靠。
+	EnableDocking(CBRS_ALIGN_LEFT);
+	EnableAutoHidePanes(CBRS_ALIGN_RIGHT);
+#endif
+
+	// 加载菜单项图像(不在任何标准工具栏上): 
+	CMFCToolBar::AddToolBarForImageCollection(IDR_MENU_IMAGES, theApp.m_bHiColorIcons ? IDB_MENU_IMAGES_24 : 0);
+
+	// 创建停靠窗口
+	if (!CreateDockingWindows())
+	{
+		TRACE0("未能创建停靠窗口\n");
+		return -1;
+	}
+
+	m_wndFileView.EnableDocking(CBRS_ALIGN_ANY);
+	m_wndClassView.EnableDocking(CBRS_ALIGN_ANY);
+	DockPane(&m_wndFileView);
+	CDockablePane* pTabbedBar = nullptr;
+	m_wndClassView.AttachToTabWnd(&m_wndFileView, DM_SHOW, TRUE, &pTabbedBar);
+	m_wndOutput.EnableDocking(CBRS_ALIGN_ANY);
+	DockPane(&m_wndOutput);
+	m_wndProperties.EnableDocking(CBRS_ALIGN_ANY);
+	DockPane(&m_wndProperties);
+
+	// 基于持久值设置视觉管理器和样式
+	OnApplicationLook(theApp.m_nAppLook);
+
+	return 0;
+}
+
+BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
+{
+	if( !CFrameWndEx::PreCreateWindow(cs) )
+		return FALSE;
+	// TODO: 在此处通过修改
+	//  CREATESTRUCT cs 来修改窗口类或样式
+
+	return TRUE;
+}
+
+BOOL CMainFrame::CreateDockingWindows()
+{
+	BOOL bNameValid;
+
+	// 创建类视图
+	CString strClassView;
+	bNameValid = strClassView.LoadString(IDS_CLASS_VIEW);
+	ASSERT(bNameValid);
+	if (!m_wndClassView.Create(strClassView, this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_CLASSVIEW, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI))
+	{
+		TRACE0("未能创建“类视图”窗口\n");
+		return FALSE; // 未能创建
+	}
+
+	// 创建文件视图
+	CString strFileView;
+	bNameValid = strFileView.LoadString(IDS_FILE_VIEW);
+	ASSERT(bNameValid);
+	if (!m_wndFileView.Create(strFileView, this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_FILEVIEW, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT| CBRS_FLOAT_MULTI))
+	{
+		TRACE0("未能创建“文件视图”窗口\n");
+		return FALSE; // 未能创建
+	}
+
+	// 创建输出窗口
+	CString strOutputWnd;
+	bNameValid = strOutputWnd.LoadString(IDS_OUTPUT_WND);
+	ASSERT(bNameValid);
+	if (!m_wndOutput.Create(strOutputWnd, this, CRect(0, 0, 100, 100), TRUE, ID_VIEW_OUTPUTWND, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_BOTTOM | CBRS_FLOAT_MULTI))
+	{
+		TRACE0("未能创建输出窗口\n");
+		return FALSE; // 未能创建
+	}
+
+	// 创建属性窗口
+	CString strPropertiesWnd;
+	bNameValid = strPropertiesWnd.LoadString(IDS_PROPERTIES_WND);
+	ASSERT(bNameValid);
+	if (!m_wndProperties.Create(strPropertiesWnd, this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_PROPERTIESWND, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_RIGHT | CBRS_FLOAT_MULTI))
+	{
+		TRACE0("未能创建“属性”窗口\n");
+		return FALSE; // 未能创建
+	}
+
+	SetDockingWindowIcons(theApp.m_bHiColorIcons);
+	return TRUE;
+}
+
+void CMainFrame::SetDockingWindowIcons(BOOL bHiColorIcons)
+{
+	HICON hFileViewIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_FILE_VIEW_HC : IDI_FILE_VIEW), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
+	m_wndFileView.SetIcon(hFileViewIcon, FALSE);
+
+	HICON hClassViewIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_CLASS_VIEW_HC : IDI_CLASS_VIEW), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
+	m_wndClassView.SetIcon(hClassViewIcon, FALSE);
+
+	HICON hOutputBarIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_OUTPUT_WND_HC : IDI_OUTPUT_WND), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
+	m_wndOutput.SetIcon(hOutputBarIcon, FALSE);
+
+	HICON hPropertiesBarIcon = (HICON) ::LoadImage(::AfxGetResourceHandle(), MAKEINTRESOURCE(bHiColorIcons ? IDI_PROPERTIES_WND_HC : IDI_PROPERTIES_WND), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), 0);
+	m_wndProperties.SetIcon(hPropertiesBarIcon, FALSE);
+
+}
+
+#if __OUTLOOKBAR__
+BOOL CMainFrame::CreateOutlookBar(CMFCOutlookBar& bar, UINT uiID, CMFCShellTreeCtrl& tree, CCalendarBar& calendar, int nInitialWidth)
+{
+	bar.SetMode2003();
+
+	BOOL bNameValid;
+	CString strTemp;
+	bNameValid = strTemp.LoadString(IDS_SHORTCUTS);
+	ASSERT(bNameValid);
+	if (!bar.Create(strTemp, this, CRect(0, 0, nInitialWidth, 32000), uiID, WS_CHILD | WS_VISIBLE | CBRS_LEFT))
+	{
+		return FALSE; // 未能创建
+	}
+
+	CMFCOutlookBarTabCtrl* pOutlookBar = (CMFCOutlookBarTabCtrl*)bar.GetUnderlyingWindow();
+
+	if (pOutlookBar == nullptr)
+	{
+		ASSERT(FALSE);
+		return FALSE;
+	}
+
+	pOutlookBar->EnableInPlaceEdit(TRUE);
+
+	static UINT uiPageID = 1;
+
+	// 可浮动,可自动隐藏,可调整大小,但不能关闭
+	DWORD dwStyle = AFX_CBRS_FLOAT | AFX_CBRS_AUTOHIDE | AFX_CBRS_RESIZE;
+
+	CRect rectDummy(0, 0, 0, 0);
+	const DWORD dwTreeStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS;
+
+	tree.Create(dwTreeStyle, rectDummy, &bar, 1200);
+	bNameValid = strTemp.LoadString(IDS_FOLDERS);
+	ASSERT(bNameValid);
+	pOutlookBar->AddControl(&tree, strTemp, 2, TRUE, dwStyle);
+
+	calendar.Create(rectDummy, &bar, 1201);
+	bNameValid = strTemp.LoadString(IDS_CALENDAR);
+	ASSERT(bNameValid);
+	pOutlookBar->AddControl(&calendar, strTemp, 3, TRUE, dwStyle);
+
+	bar.SetPaneStyle(bar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
+
+	pOutlookBar->SetImageList(theApp.m_bHiColorIcons ? IDB_PAGES_HC : IDB_PAGES, 24);
+	pOutlookBar->SetToolbarImageList(theApp.m_bHiColorIcons ? IDB_PAGES_SMALL_HC : IDB_PAGES_SMALL, 16);
+	pOutlookBar->RecalcLayout();
+
+	BOOL bAnimation = theApp.GetInt(_T("OutlookAnimation"), TRUE);
+	CMFCOutlookBarTabCtrl::EnableAnimation(bAnimation);
+
+	bar.SetButtonsFont(&afxGlobalData.fontBold);
+
+	return TRUE;
+}
+#endif
+
+#if __CAPTIONBAR__
+BOOL CMainFrame::CreateCaptionBar()
+{
+	if (!m_wndCaptionBar.Create(WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS, this, ID_VIEW_CAPTION_BAR, -1, TRUE))
+	{
+		TRACE0("未能创建标题栏\n");
+		return FALSE;
+	}
+
+	BOOL bNameValid;
+
+	CString strTemp, strTemp2;
+	bNameValid = strTemp.LoadString(IDS_CAPTION_BUTTON);
+	ASSERT(bNameValid);
+	m_wndCaptionBar.SetButton(strTemp, ID_TOOLS_OPTIONS, CMFCCaptionBar::ALIGN_LEFT, FALSE);
+	bNameValid = strTemp.LoadString(IDS_CAPTION_BUTTON_TIP);
+	ASSERT(bNameValid);
+	m_wndCaptionBar.SetButtonToolTip(strTemp);
+
+	bNameValid = strTemp.LoadString(IDS_CAPTION_TEXT);
+	ASSERT(bNameValid);
+	m_wndCaptionBar.SetText(strTemp, CMFCCaptionBar::ALIGN_LEFT);
+
+	m_wndCaptionBar.SetBitmap(IDB_INFO, RGB(255, 255, 255), FALSE, CMFCCaptionBar::ALIGN_LEFT);
+	bNameValid = strTemp.LoadString(IDS_CAPTION_IMAGE_TIP);
+	ASSERT(bNameValid);
+	bNameValid = strTemp2.LoadString(IDS_CAPTION_IMAGE_TEXT);
+	ASSERT(bNameValid);
+	m_wndCaptionBar.SetImageToolTip(strTemp, strTemp2);
+
+	return TRUE;
+}
+#endif
+
+// CMainFrame 诊断
+
+#ifdef _DEBUG
+void CMainFrame::AssertValid() const
+{
+	CFrameWndEx::AssertValid();
+}
+
+void CMainFrame::Dump(CDumpContext& dc) const
+{
+	CFrameWndEx::Dump(dc);
+}
+#endif //_DEBUG
+
+
+// CMainFrame 消息处理程序
+
+void CMainFrame::OnApplicationLook(UINT id)
+{
+	CWaitCursor wait;
+
+	theApp.m_nAppLook = id;
+
+	switch (theApp.m_nAppLook)
+	{
+	case ID_VIEW_APPLOOK_WIN_2000:
+		CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManager));
+		m_wndRibbonBar.SetWindows7Look(FALSE);
+		break;
+
+	case ID_VIEW_APPLOOK_OFF_XP:
+		CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOfficeXP));
+		m_wndRibbonBar.SetWindows7Look(FALSE);
+		break;
+
+	case ID_VIEW_APPLOOK_WIN_XP:
+		CMFCVisualManagerWindows::m_b3DTabsXPTheme = TRUE;
+		CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
+		m_wndRibbonBar.SetWindows7Look(FALSE);
+		break;
+
+	case ID_VIEW_APPLOOK_OFF_2003:
+		CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOffice2003));
+		CDockingManager::SetDockingMode(DT_SMART);
+		m_wndRibbonBar.SetWindows7Look(FALSE);
+		break;
+
+	case ID_VIEW_APPLOOK_VS_2005:
+		CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerVS2005));
+		CDockingManager::SetDockingMode(DT_SMART);
+		m_wndRibbonBar.SetWindows7Look(FALSE);
+		break;
+
+	case ID_VIEW_APPLOOK_VS_2008:
+		CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerVS2008));
+		CDockingManager::SetDockingMode(DT_SMART);
+		m_wndRibbonBar.SetWindows7Look(FALSE);
+		break;
+
+	case ID_VIEW_APPLOOK_WINDOWS_7:
+		CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows7));
+		CDockingManager::SetDockingMode(DT_SMART);
+		m_wndRibbonBar.SetWindows7Look(TRUE);
+		break;
+
+	default:
+		switch (theApp.m_nAppLook)
+		{
+		case ID_VIEW_APPLOOK_OFF_2007_BLUE:
+			CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_LunaBlue);
+			break;
+
+		case ID_VIEW_APPLOOK_OFF_2007_BLACK:
+			CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_ObsidianBlack);
+			break;
+
+		case ID_VIEW_APPLOOK_OFF_2007_SILVER:
+			CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Silver);
+			break;
+
+		case ID_VIEW_APPLOOK_OFF_2007_AQUA:
+			CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Aqua);
+			break;
+		}
+
+		CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOffice2007));
+		CDockingManager::SetDockingMode(DT_SMART);
+		m_wndRibbonBar.SetWindows7Look(FALSE);
+	}
+
+	m_wndOutput.UpdateFonts();
+	RedrawWindow(nullptr, nullptr, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_FRAME | RDW_ERASE);
+
+	theApp.WriteInt(_T("ApplicationLook"), theApp.m_nAppLook);
+}
+
+void CMainFrame::OnUpdateApplicationLook(CCmdUI* pCmdUI)
+{
+	pCmdUI->SetRadio(theApp.m_nAppLook == pCmdUI->m_nID);
+}
+
+void CMainFrame::OnClassViewCaptionBar()
+{
+#if __CAPTIONBAR__
+	m_wndCaptionBar.ShowWindow(m_wndCaptionBar.IsVisible() ? SW_HIDE : SW_SHOW);
+#endif
+#if 1
+	// 类视图;
+	BOOL bVisible = m_wndClassView.IsVisible();
+	m_wndClassView.ShowPane(!bVisible, FALSE, !bVisible);
+#endif
+	RecalcLayout(FALSE);
+}
+
+void CMainFrame::OnUpdateClassViewCaptionBar(CCmdUI* pCmdUI)
+{
+#if __CAPTIONBAR__
+	pCmdUI->SetCheck(m_wndCaptionBar.IsVisible());
+#endif
+
+#if 1
+	pCmdUI->SetCheck(m_wndClassView.IsVisible());
+#endif
+}
+
+void CMainFrame::OnOptions()
+{
+	CMFCRibbonCustomizeDialog *pOptionsDlg = new CMFCRibbonCustomizeDialog(this, &m_wndRibbonBar);
+	ASSERT(pOptionsDlg != nullptr);
+
+	pOptionsDlg->DoModal();
+	delete pOptionsDlg;
+}
+
+void CMainFrame::OnViewFileView()
+{
+	// 显示或激活窗格,具体取决于当前状态。
+	// 只能通过窗格帧上的 [x] 按钮关闭窗格。
+	m_wndFileView.ShowPane(TRUE, FALSE, TRUE);
+	m_wndFileView.SetFocus();
+}
+
+void CMainFrame::OnUpdateViewFileView(CCmdUI* pCmdUI)
+{
+	pCmdUI->Enable(TRUE);
+}
+
+void CMainFrame::OnViewClassView()
+{
+	// 显示或激活窗格,具体取决于当前状态。
+	// 只能通过窗格帧上的 [x] 按钮关闭窗格。
+	m_wndClassView.ShowPane(TRUE, FALSE, TRUE);
+	m_wndClassView.SetFocus();
+}
+
+void CMainFrame::OnUpdateViewClassView(CCmdUI* pCmdUI)
+{
+	pCmdUI->Enable(TRUE);
+}
+
+void CMainFrame::OnViewOutputWindow()
+{
+	// 显示或激活窗格,具体取决于当前状态。
+	// 只能通过窗格帧上的 [x] 按钮关闭窗格。
+	m_wndOutput.ShowPane(TRUE, FALSE, TRUE);
+	m_wndOutput.SetFocus();
+}
+
+void CMainFrame::OnUpdateViewOutputWindow(CCmdUI* pCmdUI)
+{
+	pCmdUI->Enable(TRUE);
+}
+
+void CMainFrame::OnViewPropertiesWindow()
+{
+	// 显示或激活窗格,具体取决于当前状态。
+	// 只能通过窗格帧上的 [x] 按钮关闭窗格。
+	m_wndProperties.ShowPane(TRUE, FALSE, TRUE);
+	m_wndProperties.SetFocus();
+}
+
+void CMainFrame::OnUpdateViewPropertiesWindow(CCmdUI* pCmdUI)
+{
+	pCmdUI->Enable(TRUE);
+}
+
+
+void CMainFrame::OnFilePrint()
+{
+	if (IsPrintPreview())
+	{
+		PostMessage(WM_COMMAND, AFX_ID_PREVIEW_PRINT);
+	}
+}
+
+void CMainFrame::OnFilePrintPreview()
+{
+	if (IsPrintPreview())
+	{
+		PostMessage(WM_COMMAND, AFX_ID_PREVIEW_CLOSE);  // 强制关闭“打印预览”模式
+	}
+}
+
+void CMainFrame::OnUpdateFilePrintPreview(CCmdUI* pCmdUI)
+{
+	pCmdUI->SetCheck(IsPrintPreview());
+}
+
+void CMainFrame::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
+{
+	CFrameWndEx::OnSettingChange(uFlags, lpszSection);
+	m_wndOutput.UpdateFonts();
+}
+
+
+void CMainFrame::OnGetMinMaxInfo(MINMAXINFO* lpMMI)
+{
+	// TODO: 在此添加消息处理程序代码和/或调用默认值
+	// 640*480//800*600
+	// 设置窗口最小范围;
+	lpMMI->ptMinTrackSize.x = 800;
+	lpMMI->ptMinTrackSize.y = 600;
+
+	CFrameWndEx::OnGetMinMaxInfo(lpMMI);
+}
+
+
+void CMainFrame::OnViewFileBar()
+{
+	// TODO: 在此添加命令处理程序代码
+	// 类视图;
+	BOOL bVisible = m_wndFileView.IsVisible();
+	m_wndFileView.ShowPane(!bVisible, FALSE, !bVisible);
+	RecalcLayout(FALSE);
+}
+
+
+void CMainFrame::OnUpdateViewFileBar(CCmdUI *pCmdUI)
+{
+	// TODO: 在此添加命令更新用户界面处理程序代码
+	pCmdUI->SetCheck(m_wndFileView.IsVisible());
+}
+
+
+void CMainFrame::OnViewPropertyBar()
+{
+	// TODO: 在此添加命令处理程序代码
+	BOOL bVisible = m_wndProperties.IsVisible();
+	m_wndProperties.ShowPane(!bVisible, FALSE, !bVisible);
+	RecalcLayout(FALSE);
+}
+
+
+void CMainFrame::OnUpdateViewPropertyBar(CCmdUI *pCmdUI)
+{
+	// TODO: 在此添加命令更新用户界面处理程序代码
+	pCmdUI->SetCheck(m_wndProperties.IsVisible());
+}
+
+
+void CMainFrame::OnViewOutputBar()
+{
+	// TODO: 在此添加命令处理程序代码
+	BOOL bVisible = m_wndOutput.IsVisible();
+	m_wndOutput.ShowPane(!bVisible, FALSE, !bVisible);
+	RecalcLayout(FALSE);
+}
+
+
+void CMainFrame::OnUpdateViewOutputBar(CCmdUI *pCmdUI)
+{
+	// TODO: 在此添加命令更新用户界面处理程序代码
+	pCmdUI->SetCheck(m_wndOutput.IsVisible());
+}

+ 116 - 0
IDE/IDE/MainFrm.h

@@ -0,0 +1,116 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面 
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和 
+// MFC C++ 库软件随附的相关电子文档。  
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。  
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问 
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+// MainFrm.h: CMainFrame 类的接口
+//
+
+#pragma once
+#include "FileView.h"
+#include "ClassView.h"
+#include "OutputWnd.h"
+#include "PropertiesWnd.h"
+#include "CalendarBar.h"
+#include "Resource.h"
+
+class COutlookBar : public CMFCOutlookBar
+{
+	virtual BOOL AllowShowOnPaneMenu() const { return TRUE; }
+	virtual void GetPaneName(CString& strName) const { BOOL bNameValid = strName.LoadString(IDS_OUTLOOKBAR); ASSERT(bNameValid); if (!bNameValid) strName.Empty(); }
+};
+
+class CMainFrame : public CFrameWndEx
+{
+	
+protected: // 仅从序列化创建
+	CMainFrame() noexcept;
+	DECLARE_DYNCREATE(CMainFrame)
+
+// 特性
+public:
+
+// 操作
+public:
+
+// 重写
+public:
+	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
+
+// 实现
+public:
+	virtual ~CMainFrame();
+#ifdef _DEBUG
+	virtual void AssertValid() const;
+	virtual void Dump(CDumpContext& dc) const;
+#endif
+
+protected:  // 控件条嵌入成员
+	CMFCRibbonBar     m_wndRibbonBar;
+	CMFCRibbonApplicationButton m_MainButton;
+	CMFCToolBarImages m_PanelImages;
+	CMFCRibbonStatusBar  m_wndStatusBar;
+	CFileView         m_wndFileView;
+	CClassView        m_wndClassView;
+	COutputWnd        m_wndOutput;
+	CPropertiesWnd    m_wndProperties;
+	COutlookBar       m_wndNavigationBar;
+	CMFCShellTreeCtrl m_wndTree;
+	CCalendarBar      m_wndCalendar;
+#if __CAPTIONBAR__
+	CMFCCaptionBar    m_wndCaptionBar;
+#endif
+
+// 生成的消息映射函数
+protected:
+	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
+	afx_msg void OnApplicationLook(UINT id);
+	afx_msg void OnUpdateApplicationLook(CCmdUI* pCmdUI);
+	afx_msg void OnViewFileView();
+	afx_msg void OnUpdateViewFileView(CCmdUI* pCmdUI);
+	afx_msg void OnViewClassView();
+	afx_msg void OnUpdateViewClassView(CCmdUI* pCmdUI);
+	afx_msg void OnViewOutputWindow();
+	afx_msg void OnUpdateViewOutputWindow(CCmdUI* pCmdUI);
+	afx_msg void OnViewPropertiesWindow();
+	afx_msg void OnUpdateViewPropertiesWindow(CCmdUI* pCmdUI);
+	afx_msg void OnClassViewCaptionBar();
+	afx_msg void OnUpdateClassViewCaptionBar(CCmdUI* pCmdUI);
+	afx_msg void OnOptions();
+	afx_msg void OnFilePrint();
+	afx_msg void OnFilePrintPreview();
+	afx_msg void OnUpdateFilePrintPreview(CCmdUI* pCmdUI);
+	afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
+	DECLARE_MESSAGE_MAP()
+
+	BOOL CreateDockingWindows();
+	void SetDockingWindowIcons(BOOL bHiColorIcons);
+#if __OUTLOOKBAR__
+	BOOL CreateOutlookBar(CMFCOutlookBar& bar, UINT uiID, CMFCShellTreeCtrl& tree, CCalendarBar& calendar, int nInitialWidth);
+#endif
+
+#if __CAPTIONBAR__
+	BOOL CreateCaptionBar();
+#endif
+	int FindFocusedOutlookWnd(CMFCOutlookBarTabCtrl** ppOutlookWnd);
+
+	CMFCOutlookBarTabCtrl* FindOutlookParent(CWnd* pWnd);
+	CMFCOutlookBarTabCtrl* m_pCurrOutlookWnd;
+	CMFCOutlookBarPane*    m_pCurrOutlookPage;
+public:
+	afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
+	afx_msg void OnViewFileBar();
+	afx_msg void OnUpdateViewFileBar(CCmdUI *pCmdUI);
+	afx_msg void OnViewPropertyBar();
+	afx_msg void OnUpdateViewPropertyBar(CCmdUI *pCmdUI);
+	afx_msg void OnViewOutputBar();
+	afx_msg void OnUpdateViewOutputBar(CCmdUI *pCmdUI);
+};
+
+

+ 209 - 0
IDE/IDE/OutputWnd.cpp

@@ -0,0 +1,209 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+#include "stdafx.h"
+
+#include "OutputWnd.h"
+#include "Resource.h"
+#include "MainFrm.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// COutputBar
+
+COutputWnd::COutputWnd() noexcept
+{
+}
+
+COutputWnd::~COutputWnd()
+{
+}
+
+BEGIN_MESSAGE_MAP(COutputWnd, CDockablePane)
+	ON_WM_CREATE()
+	ON_WM_SIZE()
+END_MESSAGE_MAP()
+
+int COutputWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
+{
+	if (CDockablePane::OnCreate(lpCreateStruct) == -1)
+		return -1;
+
+	CRect rectDummy;
+	rectDummy.SetRectEmpty();
+
+	// 创建选项卡窗口: 
+	if (!m_wndTabs.Create(CMFCTabCtrl::STYLE_FLAT, rectDummy, this, 1))
+	{
+		TRACE0("未能创建输出选项卡窗口\n");
+		return -1;      // 未能创建
+	}
+
+	// 创建输出窗格: 
+	const DWORD dwStyle = LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL;
+
+	if (!m_wndOutputBuild.Create(dwStyle, rectDummy, &m_wndTabs, 2) ||
+		!m_wndOutputDebug.Create(dwStyle, rectDummy, &m_wndTabs, 3) ||
+		!m_wndOutputFind.Create(dwStyle, rectDummy, &m_wndTabs, 4))
+	{
+		TRACE0("未能创建输出窗口\n");
+		return -1;      // 未能创建
+	}
+
+	UpdateFonts();
+
+	CString strTabName;
+	BOOL bNameValid;
+
+	// 将列表窗口附加到选项卡: 
+	bNameValid = strTabName.LoadString(IDS_BUILD_TAB);
+	ASSERT(bNameValid);
+	m_wndTabs.AddTab(&m_wndOutputBuild, strTabName, (UINT)0);
+	bNameValid = strTabName.LoadString(IDS_DEBUG_TAB);
+	ASSERT(bNameValid);
+	m_wndTabs.AddTab(&m_wndOutputDebug, strTabName, (UINT)1);
+	bNameValid = strTabName.LoadString(IDS_FIND_TAB);
+	ASSERT(bNameValid);
+	m_wndTabs.AddTab(&m_wndOutputFind, strTabName, (UINT)2);
+
+	// 使用一些虚拟文本填写输出选项卡(无需复杂数据)
+	FillBuildWindow();
+	FillDebugWindow();
+	FillFindWindow();
+
+	return 0;
+}
+
+void COutputWnd::OnSize(UINT nType, int cx, int cy)
+{
+	CDockablePane::OnSize(nType, cx, cy);
+
+	// 选项卡控件应覆盖整个工作区: 
+	m_wndTabs.SetWindowPos (nullptr, -1, -1, cx, cy, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
+}
+
+void COutputWnd::AdjustHorzScroll(CListBox& wndListBox)
+{
+	CClientDC dc(this);
+	CFont* pOldFont = dc.SelectObject(&afxGlobalData.fontRegular);
+
+	int cxExtentMax = 0;
+
+	for (int i = 0; i < wndListBox.GetCount(); i ++)
+	{
+		CString strItem;
+		wndListBox.GetText(i, strItem);
+
+		cxExtentMax = max(cxExtentMax, (int)dc.GetTextExtent(strItem).cx);
+	}
+
+	wndListBox.SetHorizontalExtent(cxExtentMax);
+	dc.SelectObject(pOldFont);
+}
+
+void COutputWnd::FillBuildWindow()
+{
+	m_wndOutputBuild.AddString(_T("生成输出正显示在此处。"));
+	m_wndOutputBuild.AddString(_T("输出正显示在列表视图的行中"));
+	m_wndOutputBuild.AddString(_T("但您可以根据需要更改其显示方式..."));
+}
+
+void COutputWnd::FillDebugWindow()
+{
+	m_wndOutputDebug.AddString(_T("调试输出正显示在此处。"));
+	m_wndOutputDebug.AddString(_T("输出正显示在列表视图的行中"));
+	m_wndOutputDebug.AddString(_T("但您可以根据需要更改其显示方式..."));
+}
+
+void COutputWnd::FillFindWindow()
+{
+	m_wndOutputFind.AddString(_T("查找输出正显示在此处。"));
+	m_wndOutputFind.AddString(_T("输出正显示在列表视图的行中"));
+	m_wndOutputFind.AddString(_T("但您可以根据需要更改其显示方式..."));
+}
+
+void COutputWnd::UpdateFonts()
+{
+	m_wndOutputBuild.SetFont(&afxGlobalData.fontRegular);
+	m_wndOutputDebug.SetFont(&afxGlobalData.fontRegular);
+	m_wndOutputFind.SetFont(&afxGlobalData.fontRegular);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// COutputList1
+
+COutputList::COutputList() noexcept
+{
+}
+
+COutputList::~COutputList()
+{
+}
+
+BEGIN_MESSAGE_MAP(COutputList, CListBox)
+	ON_WM_CONTEXTMENU()
+	ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
+	ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
+	ON_COMMAND(ID_VIEW_OUTPUTWND, OnViewOutput)
+	ON_WM_WINDOWPOSCHANGING()
+END_MESSAGE_MAP()
+/////////////////////////////////////////////////////////////////////////////
+// COutputList 消息处理程序
+
+void COutputList::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
+{
+	CMenu menu;
+	menu.LoadMenu(IDR_OUTPUT_POPUP);
+
+	CMenu* pSumMenu = menu.GetSubMenu(0);
+
+	if (AfxGetMainWnd()->IsKindOf(RUNTIME_CLASS(CMDIFrameWndEx)))
+	{
+		CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
+
+		if (!pPopupMenu->Create(this, point.x, point.y, (HMENU)pSumMenu->m_hMenu, FALSE, TRUE))
+			return;
+
+		((CMDIFrameWndEx*)AfxGetMainWnd())->OnShowPopupMenu(pPopupMenu);
+		UpdateDialogControls(this, FALSE);
+	}
+
+	SetFocus();
+}
+
+void COutputList::OnEditCopy()
+{
+	MessageBox(_T("复制输出"));
+}
+
+void COutputList::OnEditClear()
+{
+	MessageBox(_T("清除输出"));
+}
+
+void COutputList::OnViewOutput()
+{
+	CDockablePane* pParentBar = DYNAMIC_DOWNCAST(CDockablePane, GetOwner());
+	CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWndEx, GetTopLevelFrame());
+
+	if (pMainFrame != nullptr && pParentBar != nullptr)
+	{
+		pMainFrame->SetFocus();
+		pMainFrame->ShowPane(pParentBar, FALSE, FALSE, FALSE);
+		pMainFrame->RecalcLayout();
+
+	}
+}

+ 69 - 0
IDE/IDE/OutputWnd.h

@@ -0,0 +1,69 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+#pragma once
+
+/////////////////////////////////////////////////////////////////////////////
+// COutputList 窗口
+
+class COutputList : public CListBox
+{
+// 构造
+public:
+	COutputList() noexcept;
+
+// 实现
+public:
+	virtual ~COutputList();
+
+protected:
+	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
+	afx_msg void OnEditCopy();
+	afx_msg void OnEditClear();
+	afx_msg void OnViewOutput();
+
+	DECLARE_MESSAGE_MAP()
+};
+
+class COutputWnd : public CDockablePane
+{
+// 构造
+public:
+	COutputWnd() noexcept;
+
+	void UpdateFonts();
+
+// 特性
+protected:
+	CMFCTabCtrl	m_wndTabs;
+
+	COutputList m_wndOutputBuild;
+	COutputList m_wndOutputDebug;
+	COutputList m_wndOutputFind;
+
+protected:
+	void FillBuildWindow();
+	void FillDebugWindow();
+	void FillFindWindow();
+
+	void AdjustHorzScroll(CListBox& wndListBox);
+
+// 实现
+public:
+	virtual ~COutputWnd();
+
+protected:
+	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
+	afx_msg void OnSize(UINT nType, int cx, int cy);
+
+	DECLARE_MESSAGE_MAP()
+};
+

+ 282 - 0
IDE/IDE/PropertiesWnd.cpp

@@ -0,0 +1,282 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+#include "stdafx.h"
+
+#include "PropertiesWnd.h"
+#include "Resource.h"
+#include "MainFrm.h"
+#include "IDE.h"
+
+#ifdef _DEBUG
+#undef THIS_FILE
+static char THIS_FILE[]=__FILE__;
+#define new DEBUG_NEW
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CResourceViewBar
+
+CPropertiesWnd::CPropertiesWnd() noexcept
+{
+	m_nComboHeight = 0;
+}
+
+CPropertiesWnd::~CPropertiesWnd()
+{
+}
+
+BEGIN_MESSAGE_MAP(CPropertiesWnd, CDockablePane)
+	ON_WM_CREATE()
+	ON_WM_SIZE()
+	ON_COMMAND(ID_EXPAND_ALL, OnExpandAllProperties)
+	ON_UPDATE_COMMAND_UI(ID_EXPAND_ALL, OnUpdateExpandAllProperties)
+	ON_COMMAND(ID_SORTPROPERTIES, OnSortProperties)
+	ON_UPDATE_COMMAND_UI(ID_SORTPROPERTIES, OnUpdateSortProperties)
+	ON_COMMAND(ID_PROPERTIES1, OnProperties1)
+	ON_UPDATE_COMMAND_UI(ID_PROPERTIES1, OnUpdateProperties1)
+	ON_COMMAND(ID_PROPERTIES2, OnProperties2)
+	ON_UPDATE_COMMAND_UI(ID_PROPERTIES2, OnUpdateProperties2)
+	ON_WM_SETFOCUS()
+	ON_WM_SETTINGCHANGE()
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CResourceViewBar 消息处理程序
+
+void CPropertiesWnd::AdjustLayout()
+{
+	if (GetSafeHwnd () == nullptr || (AfxGetMainWnd() != nullptr && AfxGetMainWnd()->IsIconic()))
+	{
+		return;
+	}
+
+	CRect rectClient;
+	GetClientRect(rectClient);
+
+	int cyTlb = m_wndToolBar.CalcFixedLayout(FALSE, TRUE).cy;
+
+	m_wndObjectCombo.SetWindowPos(nullptr, rectClient.left, rectClient.top, rectClient.Width(), m_nComboHeight, SWP_NOACTIVATE | SWP_NOZORDER);
+	m_wndToolBar.SetWindowPos(nullptr, rectClient.left, rectClient.top + m_nComboHeight, rectClient.Width(), cyTlb, SWP_NOACTIVATE | SWP_NOZORDER);
+	m_wndPropList.SetWindowPos(nullptr, rectClient.left, rectClient.top + m_nComboHeight + cyTlb, rectClient.Width(), rectClient.Height() -(m_nComboHeight+cyTlb), SWP_NOACTIVATE | SWP_NOZORDER);
+}
+
+int CPropertiesWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
+{
+	if (CDockablePane::OnCreate(lpCreateStruct) == -1)
+		return -1;
+
+	CRect rectDummy;
+	rectDummy.SetRectEmpty();
+
+	// 创建组合: 
+	const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_BORDER | CBS_SORT | WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
+
+	if (!m_wndObjectCombo.Create(dwViewStyle, rectDummy, this, 1))
+	{
+		TRACE0("未能创建属性组合 \n");
+		return -1;      // 未能创建
+	}
+
+	m_wndObjectCombo.AddString(_T("应用程序"));
+	m_wndObjectCombo.AddString(_T("属性窗口"));
+	m_wndObjectCombo.SetCurSel(0);
+
+	CRect rectCombo;
+	m_wndObjectCombo.GetClientRect (&rectCombo);
+
+	m_nComboHeight = rectCombo.Height();
+
+	if (!m_wndPropList.Create(WS_VISIBLE | WS_CHILD, rectDummy, this, 2))
+	{
+		TRACE0("未能创建属性网格\n");
+		return -1;      // 未能创建
+	}
+
+	InitPropList();
+
+	m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_PROPERTIES);
+	m_wndToolBar.LoadToolBar(IDR_PROPERTIES, 0, 0, TRUE /* 已锁定*/);
+	m_wndToolBar.CleanUpLockedImages();
+	m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_PROPERTIES_HC : IDR_PROPERTIES, 0, 0, TRUE /* 锁定*/);
+
+	m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);
+	m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
+	m_wndToolBar.SetOwner(this);
+
+	// 所有命令将通过此控件路由,而不是通过主框架路由: 
+	m_wndToolBar.SetRouteCommandsViaFrame(FALSE);
+
+	AdjustLayout();
+	return 0;
+}
+
+void CPropertiesWnd::OnSize(UINT nType, int cx, int cy)
+{
+	CDockablePane::OnSize(nType, cx, cy);
+	AdjustLayout();
+}
+
+void CPropertiesWnd::OnExpandAllProperties()
+{
+	m_wndPropList.ExpandAll();
+}
+
+void CPropertiesWnd::OnUpdateExpandAllProperties(CCmdUI* /* pCmdUI */)
+{
+}
+
+void CPropertiesWnd::OnSortProperties()
+{
+	m_wndPropList.SetAlphabeticMode(!m_wndPropList.IsAlphabeticMode());
+}
+
+void CPropertiesWnd::OnUpdateSortProperties(CCmdUI* pCmdUI)
+{
+	pCmdUI->SetCheck(m_wndPropList.IsAlphabeticMode());
+}
+
+void CPropertiesWnd::OnProperties1()
+{
+	// TODO: 在此处添加命令处理程序代码
+}
+
+void CPropertiesWnd::OnUpdateProperties1(CCmdUI* /*pCmdUI*/)
+{
+	// TODO: 在此处添加命令更新 UI 处理程序代码
+}
+
+void CPropertiesWnd::OnProperties2()
+{
+	// TODO: 在此处添加命令处理程序代码
+}
+
+void CPropertiesWnd::OnUpdateProperties2(CCmdUI* /*pCmdUI*/)
+{
+	// TODO: 在此处添加命令更新 UI 处理程序代码
+}
+
+void CPropertiesWnd::InitPropList()
+{
+	SetPropListFont();
+
+	m_wndPropList.EnableHeaderCtrl(FALSE);
+	m_wndPropList.EnableDescriptionArea();
+	m_wndPropList.SetVSDotNetLook();
+	m_wndPropList.MarkModifiedProperties();
+
+	CMFCPropertyGridProperty* pGroup1 = new CMFCPropertyGridProperty(_T("外观"));
+
+	pGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("三维外观"), (_variant_t) false, _T("指定窗口的字体不使用粗体,并且控件将使用三维边框")));
+
+	CMFCPropertyGridProperty* pProp = new CMFCPropertyGridProperty(_T("边框"), _T("对话框外框"), _T("其中之一: “无”、“细”、“可调整大小”或“对话框外框”"));
+	pProp->AddOption(_T("无"));
+	pProp->AddOption(_T("细"));
+	pProp->AddOption(_T("可调整大小"));
+	pProp->AddOption(_T("对话框外框"));
+	pProp->AllowEdit(FALSE);
+
+	pGroup1->AddSubItem(pProp);
+	pGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("标题"), (_variant_t) _T("关于"), _T("指定窗口标题栏中显示的文本")));
+
+	m_wndPropList.AddProperty(pGroup1);
+
+	CMFCPropertyGridProperty* pSize = new CMFCPropertyGridProperty(_T("窗口大小"), 0, TRUE);
+
+	pProp = new CMFCPropertyGridProperty(_T("高度"), (_variant_t) 250l, _T("指定窗口的高度"));
+	pProp->EnableSpinControl(TRUE, 50, 300);
+	pSize->AddSubItem(pProp);
+
+	pProp = new CMFCPropertyGridProperty( _T("宽度"), (_variant_t) 150l, _T("指定窗口的宽度"));
+	pProp->EnableSpinControl(TRUE, 50, 200);
+	pSize->AddSubItem(pProp);
+
+	m_wndPropList.AddProperty(pSize);
+
+	CMFCPropertyGridProperty* pGroup2 = new CMFCPropertyGridProperty(_T("字体"));
+
+	LOGFONT lf;
+	CFont* font = CFont::FromHandle((HFONT) GetStockObject(DEFAULT_GUI_FONT));
+	font->GetLogFont(&lf);
+
+	_tcscpy_s(lf.lfFaceName, _T("宋体, Arial"));
+
+	pGroup2->AddSubItem(new CMFCPropertyGridFontProperty(_T("字体"), lf, CF_EFFECTS | CF_SCREENFONTS, _T("指定窗口的默认字体")));
+	pGroup2->AddSubItem(new CMFCPropertyGridProperty(_T("使用系统字体"), (_variant_t) true, _T("指定窗口使用“MS Shell Dlg”字体")));
+
+	m_wndPropList.AddProperty(pGroup2);
+
+	CMFCPropertyGridProperty* pGroup3 = new CMFCPropertyGridProperty(_T("杂项"));
+	pProp = new CMFCPropertyGridProperty(_T("(名称)"), _T("应用程序"));
+	pProp->Enable(FALSE);
+	pGroup3->AddSubItem(pProp);
+
+	CMFCPropertyGridColorProperty* pColorProp = new CMFCPropertyGridColorProperty(_T("窗口颜色"), RGB(210, 192, 254), nullptr, _T("指定默认的窗口颜色"));
+	pColorProp->EnableOtherButton(_T("其他..."));
+	pColorProp->EnableAutomaticButton(_T("默认"), ::GetSysColor(COLOR_3DFACE));
+	pGroup3->AddSubItem(pColorProp);
+
+	static const TCHAR szFilter[] = _T("图标文件(*.ico)|*.ico|所有文件(*.*)|*.*||");
+	pGroup3->AddSubItem(new CMFCPropertyGridFileProperty(_T("图标"), TRUE, _T(""), _T("ico"), 0, szFilter, _T("指定窗口图标")));
+
+	pGroup3->AddSubItem(new CMFCPropertyGridFileProperty(_T("文件夹"), _T("c:\\")));
+
+	m_wndPropList.AddProperty(pGroup3);
+
+	CMFCPropertyGridProperty* pGroup4 = new CMFCPropertyGridProperty(_T("层次结构"));
+
+	CMFCPropertyGridProperty* pGroup41 = new CMFCPropertyGridProperty(_T("第一个子级"));
+	pGroup4->AddSubItem(pGroup41);
+
+	CMFCPropertyGridProperty* pGroup411 = new CMFCPropertyGridProperty(_T("第二个子级"));
+	pGroup41->AddSubItem(pGroup411);
+
+	pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("项 1"), (_variant_t) _T("值 1"), _T("此为说明")));
+	pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("项 2"), (_variant_t) _T("值 2"), _T("此为说明")));
+	pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("项 3"), (_variant_t) _T("值 3"), _T("此为说明")));
+
+	pGroup4->Expand(FALSE);
+	m_wndPropList.AddProperty(pGroup4);
+}
+
+void CPropertiesWnd::OnSetFocus(CWnd* pOldWnd)
+{
+	CDockablePane::OnSetFocus(pOldWnd);
+	m_wndPropList.SetFocus();
+}
+
+void CPropertiesWnd::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
+{
+	CDockablePane::OnSettingChange(uFlags, lpszSection);
+	SetPropListFont();
+}
+
+void CPropertiesWnd::SetPropListFont()
+{
+	::DeleteObject(m_fntPropList.Detach());
+
+	LOGFONT lf;
+	afxGlobalData.fontRegular.GetLogFont(&lf);
+
+	NONCLIENTMETRICS info;
+	info.cbSize = sizeof(info);
+
+	afxGlobalData.GetNonClientMetrics(info);
+
+	lf.lfHeight = info.lfMenuFont.lfHeight;
+	lf.lfWeight = info.lfMenuFont.lfWeight;
+	lf.lfItalic = info.lfMenuFont.lfItalic;
+
+	m_fntPropList.CreateFontIndirect(&lf);
+
+	m_wndPropList.SetFont(&m_fntPropList);
+	m_wndObjectCombo.SetFont(&m_fntPropList);
+}

+ 72 - 0
IDE/IDE/PropertiesWnd.h

@@ -0,0 +1,72 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+#pragma once
+
+class CPropertiesToolBar : public CMFCToolBar
+{
+public:
+	virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
+	{
+		CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
+	}
+
+	virtual BOOL AllowShowOnList() const { return FALSE; }
+};
+
+class CPropertiesWnd : public CDockablePane
+{
+// 构造
+public:
+	CPropertiesWnd() noexcept;
+
+	void AdjustLayout();
+
+// 特性
+public:
+	void SetVSDotNetLook(BOOL bSet)
+	{
+		m_wndPropList.SetVSDotNetLook(bSet);
+		m_wndPropList.SetGroupNameFullWidth(bSet);
+	}
+
+protected:
+	CFont m_fntPropList;
+	CComboBox m_wndObjectCombo;
+	CPropertiesToolBar m_wndToolBar;
+	CMFCPropertyGridCtrl m_wndPropList;
+
+// 实现
+public:
+	virtual ~CPropertiesWnd();
+
+protected:
+	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
+	afx_msg void OnSize(UINT nType, int cx, int cy);
+	afx_msg void OnExpandAllProperties();
+	afx_msg void OnUpdateExpandAllProperties(CCmdUI* pCmdUI);
+	afx_msg void OnSortProperties();
+	afx_msg void OnUpdateSortProperties(CCmdUI* pCmdUI);
+	afx_msg void OnProperties1();
+	afx_msg void OnUpdateProperties1(CCmdUI* pCmdUI);
+	afx_msg void OnProperties2();
+	afx_msg void OnUpdateProperties2(CCmdUI* pCmdUI);
+	afx_msg void OnSetFocus(CWnd* pOldWnd);
+	afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
+
+	DECLARE_MESSAGE_MAP()
+
+	void InitPropList();
+	void SetPropListFont();
+
+	int m_nComboHeight;
+};
+

+ 135 - 0
IDE/IDE/Resource.h

@@ -0,0 +1,135 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ 生成的包含文件。
+// 供 IDE.rc 使用
+//
+#define IDD_ABOUTBOX                    100
+#define IDP_OLE_INIT_FAILED             100
+#define IDB_WRITESMALL                  110
+#define IDB_WRITELARGE                  111
+#define IDB_MAIN                        112
+#define IDB_BUTTONS                     113
+#define IDB_FILELARGE                   114
+#define IDB_FILESMALL                   115
+#define IDR_POPUP_EDIT                  119
+#define ID_STATUSBAR_PANE1              120
+#define ID_STATUSBAR_PANE2              121
+#define IDS_STATUS_PANE1                122
+#define IDS_STATUS_PANE2                123
+#define IDR_MAINFRAME                   128
+#define IDR_MAINFRAME_256               129
+#define IDR_IDETYPE                     130
+#define ID_WINDOW_MANAGER               131
+#define ID_VIEW_FILEVIEW                133
+#define ID_VIEW_CLASSVIEW               134
+#define ID_PROPERTIES                   135
+#define ID_OPEN                         136
+#define ID_OPEN_WITH                    137
+#define ID_DUMMY_COMPILE                138
+#define ID_CLASS_ADD_MEMBER_FUNCTION    139
+#define ID_CLASS_ADD_MEMBER_VARIABLE    140
+#define ID_CLASS_DEFINITION             141
+#define ID_CLASS_PROPERTIES             142
+#define ID_NEW_FOLDER                   143
+#define ID_SORT_MENU                    144
+#define ID_SORTING_GROUPBYTYPE          145
+#define ID_SORTING_SORTALPHABETIC       146
+#define ID_SORTING_SORTBYTYPE           147
+#define ID_SORTING_SORTBYACCESS         148
+#define ID_VIEW_OUTPUTWND               149
+#define ID_VIEW_PROPERTIESWND           150
+#define IDR_PASTE_MENU                  151
+#define ID_SORTPROPERTIES               151
+#define IDR_WINDOWS_MENU                152
+#define ID_PROPERTIES1                  152
+#define ID_PROPERTIES2                  153
+#define ID_EXPAND_ALL                   154
+#define IDS_FILE_VIEW                   155
+#define IDS_CLASS_VIEW                  156
+#define IDS_OUTPUT_WND                  157
+#define IDS_PROPERTIES_WND              158
+#define IDI_FILE_VIEW                   161
+#define IDI_FILE_VIEW_HC                162
+#define IDI_CLASS_VIEW                  163
+#define IDI_CLASS_VIEW_HC               164
+#define IDI_OUTPUT_WND                  165
+#define IDI_OUTPUT_WND_HC               166
+#define IDI_PROPERTIES_WND              167
+#define IDI_PROPERTIES_WND_HC           168
+#define IDR_EXPLORER                    169
+#define IDB_EXPLORER_24                 170
+#define IDR_SORT                        171
+#define IDB_SORT_24                     172
+#define IDR_POPUP_SORT                  173
+#define IDR_POPUP_EXPLORER              174
+#define IDB_FILE_VIEW                   175
+#define IDB_FILE_VIEW_24                176
+#define IDB_CLASS_VIEW                  177
+#define IDB_CLASS_VIEW_24               178
+#define IDR_MENU_IMAGES                 179
+#define IDB_MENU_IMAGES_24              180
+#define ID_TOOLS_MACRO                  181
+#define IDR_OUTPUT_POPUP                182
+#define IDR_PROPERTIES                  183
+#define IDB_PROPERTIES_HC               184
+#define ID_VIEW_NAVIGATION              185
+#define IDB_NAVIGATION_LARGE            186
+#define IDB_NAVIGATION_LARGE_HC         187
+#define IDB_PAGES                       188
+#define IDB_PAGES_HC                    189
+#define IDB_PAGES_SMALL                 190
+#define IDB_PAGES_SMALL_HC              191
+#define IDR_THEME_MENU                  200
+#define ID_SET_STYLE                    201
+#define ID_VIEW_APPLOOK_WIN_2000        205
+#define ID_VIEW_APPLOOK_OFF_XP          206
+#define ID_VIEW_APPLOOK_WIN_XP          207
+#define ID_VIEW_APPLOOK_OFF_2003        208
+#define ID_VIEW_APPLOOK_VS_2005         209
+#define ID_VIEW_APPLOOK_VS_2008         210
+#define ID_VIEW_APPLOOK_OFF_2007_BLUE   215
+#define ID_VIEW_APPLOOK_OFF_2007_BLACK  216
+#define ID_VIEW_APPLOOK_OFF_2007_SILVER 217
+#define ID_VIEW_APPLOOK_OFF_2007_AQUA   218
+#define ID_VIEW_APPLOOK_WINDOWS_7       219
+#define ID_TOOLS_OPTIONS                220
+#define ID_VIEW_FILE_BAR                221
+#define ID_VIEW_CLASS_BAR               222
+#define IDB_INFO                        230
+#define IDS_CAPTION_BUTTON              231
+#define IDS_CAPTION_BUTTON_TIP          232
+#define IDS_CAPTION_TEXT                233
+#define IDS_CAPTION_IMAGE_TIP           234
+#define IDS_CAPTION_IMAGE_TEXT          235
+#define IDS_MYCALENDARS                 250
+#define IDS_CALENDAR                    251
+#define IDS_SHORTCUTS                   252
+#define IDS_FOLDERS                     253
+#define IDS_OUTLOOKBAR                  258
+#define IDS_BUILD_TAB                   300
+#define IDS_DEBUG_TAB                   301
+#define IDS_FIND_TAB                    302
+#define IDS_EXPLORER                    305
+#define IDS_EDIT_MENU                   306
+#define IDR_RIBBON                      307
+#define ID_WRITE_PASTEASHYPERLINK       32770
+#define ID_VIEW_PROPERTY_BAR            32771
+#define ID_VIEW_OUTPUT_BAR              32772
+#define ID_BUTTON3                      32780
+#define ID_BUTTON4                      32781
+#define ID_BUTTON5                      32782
+#define ID_BUTTON6                      32783
+#define ID_BUTTON7                      32784
+#define ID_BUTTON8                      32785
+#define ID_BUTTON9                      32786
+#define ID_BUTTON10                     32787
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        310
+#define _APS_NEXT_COMMAND_VALUE         32788
+#define _APS_NEXT_CONTROL_VALUE         1000
+#define _APS_NEXT_SYMED_VALUE           310
+#endif
+#endif

+ 51 - 0
IDE/IDE/ViewTree.cpp

@@ -0,0 +1,51 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+#include "stdafx.h"
+#include "ViewTree.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CViewTree
+
+CViewTree::CViewTree() noexcept
+{
+}
+
+CViewTree::~CViewTree()
+{
+}
+
+BEGIN_MESSAGE_MAP(CViewTree, CTreeCtrl)
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CViewTree 消息处理程序
+
+BOOL CViewTree::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
+{
+	BOOL bRes = CTreeCtrl::OnNotify(wParam, lParam, pResult);
+
+	NMHDR* pNMHDR = (NMHDR*)lParam;
+	ASSERT(pNMHDR != nullptr);
+
+	if (pNMHDR && pNMHDR->code == TTN_SHOW && GetToolTips() != nullptr)
+	{
+		GetToolTips()->SetWindowPos(&wndTop, -1, -1, -1, -1, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSIZE);
+	}
+
+	return bRes;
+}

+ 33 - 0
IDE/IDE/ViewTree.h

@@ -0,0 +1,33 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+#pragma once
+
+/////////////////////////////////////////////////////////////////////////////
+// CViewTree 窗口
+
+class CViewTree : public CTreeCtrl
+{
+// 构造
+public:
+	CViewTree() noexcept;
+
+// 重写
+protected:
+	virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
+
+// 实现
+public:
+	virtual ~CViewTree();
+
+protected:
+	DECLARE_MESSAGE_MAP()
+};

+ 171 - 0
IDE/IDE/calendarbar.cpp

@@ -0,0 +1,171 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面 
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和 
+// MFC C++ 库软件随附的相关电子文档。  
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。  
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问 
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+#include "stdafx.h"
+#include "CalendarBar.h"
+#include "IDE.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+const int nBorderSize = 10;
+
+/////////////////////////////////////////////////////////////////////////////
+// CCalendarBar
+
+CCalendarBar::CCalendarBar()
+{
+	m_nMyCalendarsY = 0;
+}
+
+CCalendarBar::~CCalendarBar()
+{
+}
+
+BEGIN_MESSAGE_MAP(CCalendarBar, CWnd)
+	ON_WM_CREATE()
+	ON_WM_ERASEBKGND()
+	ON_WM_SIZE()
+	ON_WM_PAINT()
+	ON_WM_SETFOCUS()
+	ON_WM_SETTINGCHANGE()
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CCalendarBar 消息处理程序
+
+int CCalendarBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
+{
+	if (CWnd::OnCreate(lpCreateStruct) == -1)
+		return -1;
+
+	CRect rectDummy(0, 0, 0, 0);
+	m_wndCalendar.Create(WS_CHILD | WS_VISIBLE, rectDummy, this, 1);
+
+	CBitmap bmp;
+	bmp.LoadBitmap(IDB_PAGES_SMALL_HC);
+
+	m_Images.Create(16, 16, ILC_COLOR24 | ILC_MASK, 0, 0);
+	m_Images.Add(&bmp, RGB(255, 0, 255));
+
+	return 0;
+}
+
+BOOL CCalendarBar::PreTranslateMessage(MSG *pMsg)
+{
+	if (pMsg->message == WM_LBUTTONDOWN)
+	{
+		// 确保将键盘焦点设置到日历上
+		m_wndCalendar.SetFocus();
+	}
+
+	return CWnd::PreTranslateMessage(pMsg);
+}
+
+BOOL CCalendarBar::OnEraseBkgnd(CDC* /*pDC*/)
+{
+	return TRUE;
+}
+
+void CCalendarBar::OnSetFocus(CWnd *pOldWnd)
+{
+	CWnd::OnSetFocus(pOldWnd);
+	m_wndCalendar.SetFocus();
+}
+
+void CCalendarBar::OnSize(UINT nType, int cx, int cy)
+{
+	CWnd::OnSize(nType, cx, cy);
+
+	int nMyCalendarsHeight = 70;
+
+	if (m_wndCalendar.GetSafeHwnd() != nullptr)
+	{
+		m_wndCalendar.SetWindowPos(nullptr, nBorderSize, nBorderSize, cx - 2 * nBorderSize, cy - 2 * nBorderSize - nMyCalendarsHeight - 10, SWP_NOZORDER | SWP_NOACTIVATE);
+	}
+
+	m_nMyCalendarsY = cy - nMyCalendarsHeight;
+}
+
+BOOL CCalendarBar::Create(const RECT& rect, CWnd* pParentWnd, UINT nID)
+{
+	return CWnd::Create(nullptr, _T(""), WS_CHILD | WS_VISIBLE, rect, pParentWnd, nID);
+}
+
+void CCalendarBar::OnPaint()
+{
+	CPaintDC dc(this); // 用于绘制的设备上下文
+
+	CRect rectClient;
+	GetClientRect(rectClient);
+
+	dc.FillRect(rectClient, &afxGlobalData.brWindow);
+
+	if (rectClient.bottom - m_nMyCalendarsY > 0)
+	{
+		CRect rectMyCalendarsCaption = rectClient;
+		rectMyCalendarsCaption.top = m_nMyCalendarsY;
+		rectMyCalendarsCaption.bottom = rectMyCalendarsCaption.top + afxGlobalData.GetTextHeight(TRUE) * 3 / 2;
+
+		COLORREF clrText = CMFCVisualManager::GetInstance()->OnDrawPaneCaption(&dc, nullptr, FALSE, rectMyCalendarsCaption, CRect(0, 0, 0, 0));
+
+		CPen* pOldPen = dc.SelectObject(&afxGlobalData.penBarShadow);
+
+		dc.MoveTo(rectMyCalendarsCaption.left - 1, rectMyCalendarsCaption.top);
+		dc.LineTo(rectMyCalendarsCaption.right, rectMyCalendarsCaption.top);
+
+		dc.SelectStockObject(BLACK_PEN);
+
+		dc.MoveTo(rectMyCalendarsCaption.left - 1, rectMyCalendarsCaption.bottom);
+		dc.LineTo(rectMyCalendarsCaption.right, rectMyCalendarsCaption.bottom);
+
+		dc.SelectObject(pOldPen);
+
+		CRect rectText = rectMyCalendarsCaption;
+		rectText.DeflateRect(10, 0);
+
+		dc.SetBkMode(TRANSPARENT);
+		dc.SetTextColor(clrText);
+
+		CFont* pOldFont = dc.SelectObject(&afxGlobalData.fontRegular);
+
+		BOOL bNameValid;
+		CString str;
+
+		bNameValid = str.LoadString(IDS_MYCALENDARS);
+		ASSERT(bNameValid);
+		dc.DrawText(str, rectText, DT_VCENTER | DT_LEFT | DT_SINGLELINE);
+
+		CRect rectCalendar = rectClient;
+		rectCalendar.top = rectMyCalendarsCaption.bottom + 5;
+		rectCalendar.bottom = rectCalendar.top + afxGlobalData.GetTextHeight(TRUE) * 3 / 2 - 5;
+
+		dc.FillSolidRect(rectCalendar, RGB(255, 255, 213));
+
+		rectCalendar.DeflateRect(20, 0);
+		m_Images.Draw(&dc, 3, rectCalendar.TopLeft(), 0);
+
+		rectCalendar.left += 20;
+
+		bNameValid = str.LoadString(IDS_CALENDAR);
+		ASSERT(bNameValid);
+
+		dc.SetTextColor(afxGlobalData.clrHotLinkNormalText);
+		dc.DrawText(str, rectCalendar, DT_VCENTER | DT_LEFT | DT_SINGLELINE);
+
+		dc.SelectObject(pOldFont);
+	}
+}
+
+

+ 46 - 0
IDE/IDE/calendarbar.h

@@ -0,0 +1,46 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面 
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和 
+// MFC C++ 库软件随附的相关电子文档。  
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。  
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问 
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+#pragma once
+
+/////////////////////////////////////////////////////////////////////////////
+// CCalendarBar 窗口
+
+class CCalendarBar : public CWnd
+{
+// 构造
+public:
+	CCalendarBar();
+
+// 特性
+protected:
+	CMonthCalCtrl m_wndCalendar;
+	int m_nMyCalendarsY;
+	CImageList m_Images;
+
+// 重写
+public:
+	virtual BOOL Create(const RECT& rect, CWnd* pParentWnd, UINT nID = (UINT)-1);
+	virtual BOOL PreTranslateMessage(MSG *pMsg);
+
+// 实现
+public:
+	virtual ~CCalendarBar();
+
+protected:
+	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
+	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
+	afx_msg void OnSize(UINT nType, int cx, int cy);
+	afx_msg void OnPaint();
+	afx_msg void OnSetFocus(CWnd *pOldWnd);
+
+	DECLARE_MESSAGE_MAP()
+};

BIN
IDE/IDE/res/IDE.ico


BIN
IDE/IDE/res/IDE.png


BIN
IDE/IDE/res/IDE.rc2


BIN
IDE/IDE/res/IDEDoc.ico


BIN
IDE/IDE/res/Toolbar.bmp


BIN
IDE/IDE/res/Toolbar256.bmp


BIN
IDE/IDE/res/buttons.bmp


BIN
IDE/IDE/res/class_view.ico


BIN
IDE/IDE/res/class_view_hc.ico


BIN
IDE/IDE/res/classview.bmp


BIN
IDE/IDE/res/classview_hc.bmp


BIN
IDE/IDE/res/explorer.bmp


BIN
IDE/IDE/res/explorer_hc.bmp


BIN
IDE/IDE/res/file_view.ico


BIN
IDE/IDE/res/file_view_hc.ico


BIN
IDE/IDE/res/filelarge.bmp


BIN
IDE/IDE/res/filesmall.bmp


BIN
IDE/IDE/res/fileview.bmp


BIN
IDE/IDE/res/fileview_hc.bmp


BIN
IDE/IDE/res/info.bmp


BIN
IDE/IDE/res/main.bmp


BIN
IDE/IDE/res/menuimages.bmp


BIN
IDE/IDE/res/menuimages_hc.bmp


BIN
IDE/IDE/res/nav_large.bmp


BIN
IDE/IDE/res/nav_large_hc.bmp


BIN
IDE/IDE/res/output_wnd.ico


BIN
IDE/IDE/res/output_wnd_hc.ico


BIN
IDE/IDE/res/pages.bmp


BIN
IDE/IDE/res/pages_hc.bmp


BIN
IDE/IDE/res/pages_small.bmp


BIN
IDE/IDE/res/pages_small_hc.bmp


BIN
IDE/IDE/res/properties.bmp


BIN
IDE/IDE/res/properties_hc.bmp


BIN
IDE/IDE/res/properties_wnd.ico


BIN
IDE/IDE/res/properties_wnd_hc.ico


File diff suppressed because it is too large
+ 0 - 0
IDE/IDE/res/ribbon.mfcribbon-ms


BIN
IDE/IDE/res/sort.bmp


BIN
IDE/IDE/res/sort_hc.bmp


BIN
IDE/IDE/res/writelarge.bmp


BIN
IDE/IDE/res/writesmall.bmp


+ 18 - 0
IDE/IDE/stdafx.cpp

@@ -0,0 +1,18 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+// stdafx.cpp : 只包括标准包含文件的源文件
+// IDE.pch 将作为预编译标头
+// stdafx.obj 将包含预编译类型信息
+
+#include "stdafx.h"
+
+

+ 76 - 0
IDE/IDE/stdafx.h

@@ -0,0 +1,76 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+// stdafx.h : 标准系统包含文件的包含文件,
+// 或是经常使用但不常更改的
+// 特定于项目的包含文件
+
+#pragma once
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN            // 从 Windows 头中排除极少使用的资料
+#endif
+
+#include "targetver.h"
+
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // 某些 CString 构造函数将是显式的
+
+// 关闭 MFC 对某些常见但经常可放心忽略的警告消息的隐藏
+#define _AFX_ALL_WARNINGS
+
+#include <afxwin.h>         // MFC 核心组件和标准组件
+#include <afxext.h>         // MFC 扩展
+
+
+#include <afxdisp.h>        // MFC 自动化类
+
+
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxdtctl.h>           // MFC 对 Internet Explorer 4 公共控件的支持
+#endif
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h>             // MFC 对 Windows 公共控件的支持
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include <afxcontrolbars.h>     // 功能区和控件条的 MFC 支持
+
+
+
+// 启停导航栏;
+#define __OUTLOOKBAR__ 0
+// 启停标题栏;
+#define __CAPTIONBAR__ 0
+// 启停快速访问工具栏;
+#define __QUICKACCESS_COMMAND__ 0
+
+// gdi+
+#include <gdiplus.h>
+using namespace Gdiplus;
+#pragma comment(lib, "gdiplus.lib")
+
+// 只需要包含一个头文件即可;
+#include "opencv2/opencv.hpp"
+using namespace std;
+using namespace cv;
+
+
+#ifdef _UNICODE
+#if defined _M_IX86
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#elif defined _M_X64
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#else
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#endif
+#endif
+
+

+ 19 - 0
IDE/IDE/targetver.h

@@ -0,0 +1,19 @@
+// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
+// (“Fluent UI”)。该示例仅供参考,
+// 用以补充《Microsoft 基础类参考》和
+// MFC C++ 库软件随附的相关电子文档。
+// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
+// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
+// https://go.microsoft.com/fwlink/?LinkId=238214.
+//
+// 版权所有(C) Microsoft Corporation
+// 保留所有权利。
+
+#pragma once
+
+// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
+
+// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
+// 将 _WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
+
+#include <SDKDDKVer.h>

Some files were not shown because too many files changed in this diff