| 382 | //////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 383 | |
| 384 | void CFamiTrackerView::OnDraw(CDC* pDC) |
| 385 | { |
| 386 | // How should we protect the DC in this method? |
| 387 | |
| 388 | // Check document |
| 389 | if (!GetDocument()->IsFileLoaded()) { |
| 390 | const WCHAR str[] = L"No module loaded."; // // // |
| 391 | pDC->FillSolidRect(0, 0, m_iWindowWidth, m_iWindowHeight, 0x000000); |
| 392 | pDC->SetTextColor(0xFFFFFF); |
| 393 | CRect textRect(0, 0, m_iWindowWidth, m_iWindowHeight); |
| 394 | pDC->DrawTextW(str, std::size(str), &textRect, DT_CENTER | DT_VCENTER | DT_SINGLELINE); |
| 395 | return; |
| 396 | } |
| 397 | |
| 398 | // Don't draw when rendering to wave file |
| 399 | CSoundGen *pSoundGen = FTEnv.GetSoundGenerator(); |
| 400 | if (pSoundGen == NULL || pSoundGen->IsBackgroundTask()) |
| 401 | return; |
| 402 | |
| 403 | m_pPatternEditor->DrawScreen(*pDC, this); // // // |
| 404 | GetMainFrame()->GetFrameEditor()->DrawScreen(pDC); // // // |
| 405 | } |
| 406 | |
| 407 | BOOL CFamiTrackerView::OnEraseBkgnd(CDC* pDC) |
| 408 | { |
nothing calls this directly
no test coverage detected