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

📄 dialogfilewnd.cpp

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

#include "stdafx.h"
#include "FileDialogView.h"
#include "DialogFileWnd.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDialogFileWnd

CDialogFileWnd::CDialogFileWnd()
{
}

CDialogFileWnd::~CDialogFileWnd()
{
}

HWND CDialogFileWnd::hWndToolBar = NULL;

BEGIN_MESSAGE_MAP(CDialogFileWnd, CWnd)
	//{{AFX_MSG_MAP(CDialogFileWnd)
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CDialogFileWnd message handlers

void CDialogFileWnd::PreSubclassWindow() 
{
	// TODO: Add your specialized code here and/or call the base class
	CWnd::PreSubclassWindow();
	ModifyStyleEx(WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE,0);
}

void CDialogFileWnd::OnSize(UINT nType, int cx, int cy) 
{
	CWnd::OnSize(nType, cx, cy);
	
	// TODO: Add your message handler code here
	CWnd* pWnd = GetDlgItem(lst2);
	pWnd->MoveWindow(0,26,cx-1,cy-26);

	pWnd = GetDlgItem(cmb2);
	pWnd->MoveWindow(1,0,cx-102,300);

	if(IsWindow(CDialogFileWnd::hWndToolBar))
	{
		CWnd * ToolBar = CWnd::FromHandle(CDialogFileWnd::hWndToolBar);

		CRect rect1,rect2;
		ToolBar->GetWindowRect(&rect1);
		GetClientRect(&rect2);
		
		
		ToolBar->MoveWindow(rect2.Width()-rect1.Width()+32,
							0,
							rect1.Width(),
							rect1.Height());
	}
}

⌨️ 快捷键说明

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