R
Und wo steht, dass man innerhalb OnDraw das Fenster resizen sollte??
void CImageMasterView::OnInitialUpdate()
{
CImageMasterDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// Aus dem Document die BitmapInfo besorgen
BITMAPINFO *tmpBitmapInfo = pDoc->GetBitmapInfo();
// Die Fenstergröße an das Bild anpassen
CRect rc( 0, 0, tmpBitmapInfo->bmiHeader.biWidth, tmpBitmapInfo->bmiHeader.biHeight);
CWnd* pParent = GetParent();
pParent->CalcWindowRect( &rc, CWnd::adjustBorder);
pParent->MoveWindow( 0, 0, rc.Width(), rc.Height());
}