Solved

Invalidating the Window From OnPaint or OnDraw

Posted on 1997-06-24
1
528 Views
Last Modified: 2013-11-19
Is it possible to call Invalidate either directly or via a method in OnPaint or OnDraw.  I receive an assertion error when I try.  If I cannot please explain why.  Thank you...

ERIK SUTCLIFFE  
0
Comment
Question by:darman
1 Comment
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1302288
Yes, you can. Simply try the following code in your OnDraw:

pDC->TextOut(0, 0, CString("ABCDEFGHIJKL"));
this->Invalidate();

The program will be busy sending WM_PAINT message.

What is the assertion error?
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now