Ejemplo n.º 1
0
/////////////////////////////////////////////////////////////////////////////
// CResizeView message handlers
void CResizeView::ShowOnDc(const IplImage*img,int idx /* = 0 */,int idy /* =0 */,const char * title /* = */ )
{
	CClientDC dc(this);	
	OnPrepareDC(&dc);
	CImage image;
	//image.Load(path);
	image.CopyOf((IplImage *)img);
	//HDC hdc = ::GetDC(this->m_hWnd);   
	//image.Draw(hdc, 300, 200); 
	RECT * tmpRect = new RECT();
	tmpRect->right = image.Width() + idx;
	tmpRect->left = 0 + idx;
	tmpRect->top = 0 + idy;
	tmpRect->bottom = image.Height() + idy;
	image.DrawToHDC(dc,tmpRect);
	dc.TextOut(idx,image.Height() + idy,title);
	//UpdateData(FALSE);	
	OnDraw(&dc);
}