wndex.cpp

来自「对测井数据显示、编辑、处理」· C++ 代码 · 共 62 行

CPP
62
字号
// WndEx.cpp : implementation file
//

#include "stdafx.h"
#include "WndEx.h"

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

/////////////////////////////////////////////////////////////////////////////
// CWndEx

CWndEx::CWndEx()
{
}

CWndEx::~CWndEx()
{
}


BEGIN_MESSAGE_MAP(CWndEx, CWnd)
	//{{AFX_MSG_MAP(CWndEx)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CWndEx message handlers
BOOL CWndEx::CreateEx(DWORD dwExStyle,CString strWindowName,DWORD dwStyle,CRect rect,CWnd* pwndParent)
{
	HCURSOR hCursor = AfxGetApp()->LoadStandardCursor (IDC_ARROW);
	HBRUSH hBrush = (HBRUSH)(COLOR_WINDOW+1);
	HICON hIcon = NULL;

	CString strClassName;
	strClassName = AfxRegisterWndClass(CS_DBLCLKS,hCursor,hBrush,hIcon);
	
	int x = rect.left ;
	int y = rect.top ;
	int nWidth = rect.Width();
	int nHeight = rect.Height();
	HWND hWndParent = pwndParent->m_hWnd;

	return CWnd::CreateEx(dwExStyle,strClassName,strWindowName,dwStyle,x,y,nWidth,nHeight,hWndParent,NULL);

}
BOOL CWndEx::CreateEx(DWORD dwExStyle, LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID)
{
	return CWnd::CreateEx (dwExStyle,lpszClassName,lpszWindowName,dwStyle,rect,pParentWnd,nID);
}

BOOL CWndEx::Create(CString strWindowName,DWORD dwStyle,CRect rect,CWnd* pwndParent)
{
	return CreateEx(NULL,strWindowName,dwStyle,rect,pwndParent);
}

⌨️ 快捷键说明

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