E
So schaut mein Code in der OnPaint aus:
void CMalenDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // Gerätekontext für Zeichnen
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Symbol in Client-Rechteck zentrieren
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Symbol zeichnen
dc.DrawIcon(x, y, m_hIcon);
}
else
{
m_DrawBoard.DrawLines(m_pDrawingElements, this);
m_DrawBoard.DrawCircles(m_pDrawingElements, this);
m_DrawBoard.DrawPushPoint(m_pDrawingElements, this);
CDialog::OnPaint();
}
}
Dabei ist CDrawBoard eine Klasse, in welcher meine Zeichungsroutinen stehen (mit dcMoveTo, LineTo usw.) und m_DrawBoard ist meine Variable vom Typ CDrawBoard, um die Routinen aufzurufen...
Über die m_pDrawingElements rufe ich gespeicherte Koordinaten ab...
Mapping Modes???