| 198 | |
| 199 | |
| 200 | LRESULT cBiomeViewWnd::OnPaint(void) |
| 201 | { |
| 202 | PAINTSTRUCT ps; |
| 203 | HDC DC = BeginPaint(m_Wnd, &ps); |
| 204 | |
| 205 | RECT rc; |
| 206 | GetClientRect(m_Wnd, &rc); |
| 207 | int Wid = rc.right - rc.left; |
| 208 | int Hei = rc.bottom - rc.top; |
| 209 | if ((m_Pixmap.GetWidth() != Wid) || (m_Pixmap.GetHeight() != Hei)) |
| 210 | { |
| 211 | m_Pixmap.SetSize(Wid, Hei); |
| 212 | if (m_Renderer.Render(m_Pixmap)) |
| 213 | { |
| 214 | SetTimer(m_Wnd, TIMER_RERENDER, 200, NULL); |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | m_Pixmap.DrawToDC(DC, 0, 0); |
| 219 | |
| 220 | EndPaint(m_Wnd, &ps); |
| 221 | return 0; |
| 222 | } |
| 223 | |
| 224 | |
| 225 | |