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

📄 childview.cpp

📁 类似于文件浏览器的vc++应用程序,容易使用,能进行各种文件操作.
💻 CPP
字号:
// ChildView.cpp : implementation of the CChildView class
//

#include "stdafx.h"
#include "FileDialogView.h"
#include "ChildView.h"
#include "DialogThread.h"

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

/////////////////////////////////////////////////////////////////////////////
// CChildView

CChildView::CChildView()
{
}

CChildView::~CChildView()
{
}


BEGIN_MESSAGE_MAP(CChildView,CWnd )
	//{{AFX_MSG_MAP(CChildView)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CChildView message handlers

BOOL CChildView::Create(LPCTSTR, LPCTSTR, DWORD, const RECT&, CWnd* pParentWnd, UINT nID, CCreateContext* ) 
{
	m_pDialogThread = 
		(CDialogThread*)AfxBeginThread(RUNTIME_CLASS(CDialogThread), 
				THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED );
	ASSERT_VALID(m_pDialogThread);

	m_pDialogThread->m_hWndParent = *pParentWnd;
	m_pDialogThread->m_pMainWnd = NULL;
	m_pDialogThread->m_pAttachedView = this;
	m_pDialogThread->m_nID = nID;
	VERIFY(m_pDialogThread->ResumeThread());

	MSG msg;
	while(WAIT_OBJECT_0 + 1 == MsgWaitForMultipleObjects( 
			1,
			&m_pDialogThread->m_hEventCreated,
			FALSE,
			5000,
			QS_ALLINPUT	))
	{
		::PeekMessage( &msg, NULL, 0, 0, PM_REMOVE);
		if(NULL != m_pDialogThread->m_pMainWnd)		break;
	}

	Attach(*m_pDialogThread->m_pMainWnd);
	SetDlgCtrlID(nID);
	return TRUE;
}


BOOL CChildView::DestroyWindow() 
{
	Detach();
	m_pDialogThread->PostThreadMessage(WM_QUIT, 0, 0);
	return CWnd::DestroyWindow();
}

⌨️ 快捷键说明

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