示例#1
0
void CDxtexDoc::OnFormatResize() 
{
    CResizeDialog resizeDialog;

    resizeDialog.m_oldWidth.Format("%d", m_dwWidth);
    resizeDialog.m_oldHeight.Format("%d", m_dwHeight);
    resizeDialog.m_newWidth = m_dwWidth;
    resizeDialog.m_newHeight = m_dwHeight;
    resizeDialog.m_oldWidth.Format("%d", m_dwWidth);
    if( IDOK == resizeDialog.DoModal() )
        Resize(resizeDialog.m_newWidth, resizeDialog.m_newHeight);
}
void CIMDisplayView::OnResize() 
{
    CIMDisplayDoc* pDoc = GetDocument();
    ASSERT_VALID(pDoc);

    CResizeDialog   dlg;

    dlg.Width( pDoc->GetImage().columns() );
    dlg.Height( pDoc->GetImage().rows() );

    if ( dlg.DoModal() == IDOK ) {
	Geometry	newGeo( dlg.Width(), dlg.Height() );
	newGeo.percent( dlg.IsPercentage() );
	ResizeImage( newGeo );
    }
}