⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 debugoutinfodlg.cpp

📁 一个PLX教学编译器IDE
💻 CPP
字号:

#include "stdafx.h"
#include "plxc.h"
#include "DebugOutinfoDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

CDebugOutinfoDlg::CDebugOutinfoDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CDebugOutinfoDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDebugOutinfoDlg)
	//}}AFX_DATA_INIT
	
	m_strFont.CreateFont(16,0,0,0,
		                 FW_NORMAL,
		                 FALSE,FALSE,FALSE,
		                 GB2312_CHARSET,
		                 OUT_DEFAULT_PRECIS,
		                 CLIP_DEFAULT_PRECIS,
		                 DEFAULT_QUALITY,
		                 DEFAULT_PITCH|FF_ROMAN,
		                 _T("Fixedsys"));
}

void CDebugOutinfoDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);

	//{{AFX_DATA_MAP(CDebugOutinfoDlg)
	DDX_Control(pDX, IDC_VARIABLESTATIC, m_variableStatic);
	DDX_Control(pDX, IDC_CODESTATIC, m_codeState);
	DDX_Control(pDX, IDC_RESULTSTATIC, m_resultStatic);
	DDX_Control(pDX, IDC_VARIABLELIST, m_variableList);
	DDX_Control(pDX, IDC_RESULTVIEW, m_resultView);
	DDX_Control(pDX, IDC_CODEVIEW, m_codeView);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CDebugOutinfoDlg, CDialog)
	//{{AFX_MSG_MAP(CDebugOutinfoDlg)
	ON_WM_SIZE()
	ON_WM_CLOSE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

BOOL CDebugOutinfoDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	m_codeView      .SetFont(&m_strFont);
	m_resultView    .SetFont(&m_strFont);
	m_resultStatic  .SetFont(&m_strFont);
	m_codeState     .SetFont(&m_strFont);
	m_variableStatic.SetFont(&m_strFont);
	m_variableList  .SetFont(&m_strFont);

    m_variableList.SetListTitle();

	return TRUE;  
}

void CDebugOutinfoDlg::OnSize(UINT nType, int cx, int cy) 
{
	CDialog::OnSize(nType, cx, cy);

	if(m_variableList.m_hWnd != NULL &&
	   m_resultView.m_hWnd   != NULL &&
	   m_codeView .m_hWnd    != NULL)
	{
		CRect rc;
	    GetClientRect(rc);

		UINT split    = 4;
		UINT wndWidth = (rc.Width()-2*split)/3;

		m_variableList  .MoveWindow(CRect(rc.left           , rc.top+22, rc.left + wndWidth    ,rc.bottom));
        m_resultView    .MoveWindow(CRect(rc.left+wndWidth  , rc.top+22, rc.left + wndWidth*2  ,rc.bottom));
	    m_codeView      .MoveWindow(CRect(rc.left+2*wndWidth, rc.top+22, rc.right              ,rc.bottom));
	    m_resultStatic  .MoveWindow(CRect(rc.left+wndWidth  , rc.top,    rc.left + wndWidth*2  ,rc.top+20));
        m_codeState     .MoveWindow(CRect(rc.left+2*wndWidth, rc.top,    rc.right              ,rc.top+20));
        m_variableStatic.MoveWindow(CRect(rc.left           , rc.top,    rc.left + wndWidth    ,rc.top+20));
	}
}

void CDebugOutinfoDlg::OnClose() 
{
    m_strFont.DeleteObject();
	CDialog::OnClose();
}

⌨️ 快捷键说明

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