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

📄 infohideview.cpp

📁 该电话薄使用的是数据库
💻 CPP
字号:
// InfoHideView.cpp : implementation of the CInfoHideView class
//

#include "stdafx.h"
#include "InfoHide.h"

#include "InfoHideDoc.h"
#include "InfoHideView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CInfoHideView

IMPLEMENT_DYNCREATE(CInfoHideView, CView)

BEGIN_MESSAGE_MAP(CInfoHideView, CView)
	//{{AFX_MSG_MAP(CInfoHideView)
	ON_WM_MOUSEMOVE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CInfoHideView construction/destruction

CInfoHideView::CInfoHideView()
{
	// TODO: add construction code here
}

CInfoHideView::~CInfoHideView()
{
}

BOOL CInfoHideView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CInfoHideView drawing

void CInfoHideView::OnDraw(CDC* pDC)
{
	CInfoHideDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
	pDoc->OnDraw(pDC);
}

/////////////////////////////////////////////////////////////////////////////
// CInfoHideView diagnostics

#ifdef _DEBUG
void CInfoHideView::AssertValid() const
{
	CView::AssertValid();
}

void CInfoHideView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

CInfoHideDoc* CInfoHideView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CInfoHideDoc)));
	return (CInfoHideDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CInfoHideView message handlers

void CInfoHideView::OnMouseMove(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	CString wx,wy,wr,wg,wb,total;
	CRect crect;
	GetClientRect(&crect);
	HDC hDC = ::GetDC(*this);
    COLORREF clr = ::GetPixel(hDC, point.x, point.y);
	wx.Format("x%d",point.x);
	wy.Format("y%d",point.y);
	wr.Format("r%d",GetRValue(clr));
	wg.Format("g%d",GetGValue(clr));
	wb.Format("b%d",GetBValue(clr));
	
	total=wx+"  "+wy+"  "+wr+"  "+wg+"  "+wb+"            ";
	TextOut(hDC,crect.right-200,crect.bottom-20,total,strlen(total));

	CView::OnMouseMove(nFlags, point);
}

⌨️ 快捷键说明

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