Solved

Invalidating the Window From OnPaint or OnDraw

Posted on 1997-06-24
1
534 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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need to retreive data from .TFS file exported by DVR 8 200
Adapt this command to show who installed 29 108
has77  challenge 9 85
noX challenge 17 117
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

809 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