staticimage.cpp

来自「实时视频捕获」· C++ 代码 · 共 52 行

CPP
52
字号
// StaticImage.cpp : implementation file
//

#include "stdafx.h"
#include "ImageObject.h"
#include "StaticImage.h"
#include "ImageObjectDlg.h"

// CStaticImage

IMPLEMENT_DYNAMIC(CStaticImage, CStatic)

CStaticImage::CStaticImage()
{
//
}

CStaticImage::~CStaticImage()
{
}


BEGIN_MESSAGE_MAP(CStaticImage, CStatic)

	ON_WM_LBUTTONDOWN()
	ON_WM_LBUTTONUP()
END_MESSAGE_MAP()



// CStaticImage message handlers

void CStaticImage::OnLButtonDown(UINT nFlags, CPoint point)
{
	// TODO: Add your message handler code here and/or call default
	CImageObjectDlg* pParent=(CImageObjectDlg*)GetParent( );
	if(pParent->m_SetEnable)
	{
		SetCapture();		
	}
	CWnd::OnLButtonDown(nFlags, point);
}
void CStaticImage::OnLButtonUp(UINT nFlags, CPoint point)
{
	// TODO: Add your message handler code here and/or call default
	CImageObjectDlg* pParent=(CImageObjectDlg*)GetParent( );
	if(pParent->m_SetEnable)
	{
		ReleaseCapture();		
	}
	CWnd::OnLButtonUp(nFlags, point);
}

⌨️ 快捷键说明

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