void CButtonTestView::OnButtonClicked() { AfxMessageBox(L"Button clicked"); Clicked = TRUE; Invalidate(); UpdateWindow(); } void CButtonTestView::OnDraw(CDC* pDC) { CButtonTestDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); if (!pDoc) return; // TODO: add draw code for native data here pDC->TextOutW(800, 100, _T("Button test")); if (Clicked) { InvalidateRect(nullptr, TRUE); } }
InvalidateRect
OnDraw
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)