Click here to Skip to main content
15,895,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC Force Painting Pin
Mark Salsbery20-Feb-07 5:41
Mark Salsbery20-Feb-07 5:41 
GeneralRe: MFC Force Painting Pin
Bram van Kampen20-Feb-07 12:14
Bram van Kampen20-Feb-07 12:14 
GeneralRe: MFC Force Painting Pin
Mark Salsbery20-Feb-07 12:31
Mark Salsbery20-Feb-07 12:31 
GeneralRe: MFC Force Painting [modified] Pin
Mark Salsbery20-Feb-07 14:06
Mark Salsbery20-Feb-07 14:06 
GeneralRe: MFC Force Painting Pin
Bram van Kampen21-Feb-07 14:11
Bram van Kampen21-Feb-07 14:11 
GeneralRe: MFC Force Painting Pin
Mark Salsbery21-Feb-07 14:23
Mark Salsbery21-Feb-07 14:23 
GeneralRe: MFC Force Painting Pin
Bram van Kampen20-Feb-07 13:33
Bram van Kampen20-Feb-07 13:33 
GeneralRe: MFC Force Painting Pin
Mark Salsbery20-Feb-07 13:49
Mark Salsbery20-Feb-07 13:49 
LateNightsInNewry wrote:
I am NOT trying to paint a Dialog in the middle of creation. Rather,I want to keep an Entirely Unrelated Window on the heap which acts as visual background, painted on the screen at all times. Unfortunately it gets clobbered, I try to repaint before starting something lengthy, just does not happen.


Right I'm following you Smile | :)

All the windows on a given UI thread use the same message loop so even tieing up a child window's
creation will effect underlying parent windows messages.

In OnInitDialog() you are in the middle of handling the WM_INITDIALOG message. Until you
return from that, all the WM_PAINT (and other) messages for all the windows on the thread are
stuck in the queue.

All messages involved in redrawing the clobbered background window need to be flushed and
dispatched before entering any new lengthy operation, unless that operation is going to
periodically pump the waiting messages (and again, OnInitDialog() is a bad place for that...the
window isn't fully created and displayed yet).

Mark




"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."

GeneralRe: MFC Force Painting Pin
Bram van Kampen19-Feb-07 13:50
Bram van Kampen19-Feb-07 13:50 
GeneralRe: MFC Force Painting Pin
Mark Salsbery19-Feb-07 13:55
Mark Salsbery19-Feb-07 13:55 
GeneralRe: MFC Force Painting Pin
Bram van Kampen19-Feb-07 15:23
Bram van Kampen19-Feb-07 15:23 
QuestionHow do I create 4 MDI child windows at start? Pin
Cengine19-Feb-07 12:43
Cengine19-Feb-07 12:43 
QuestionRe: How do I create 4 MDI child windows at start? Pin
Mark Salsbery19-Feb-07 13:16
Mark Salsbery19-Feb-07 13:16 
AnswerRe: How do I create 4 MDI child windows at start? Pin
Cengine19-Feb-07 13:24
Cengine19-Feb-07 13:24 
GeneralRe: How do I create 4 MDI child windows at start? Pin
Mark Salsbery19-Feb-07 13:51
Mark Salsbery19-Feb-07 13:51 
QuestionNeed printing help - How to print on 1/4 the part of A4 paper on dot-matrix printer Pin
anand_study19-Feb-07 7:37
anand_study19-Feb-07 7:37 
AnswerRe: Need printing help - How to print on 1/4 the part of A4 paper on dot-matrix printer Pin
Mark Salsbery19-Feb-07 12:11
Mark Salsbery19-Feb-07 12:11 
GeneralRe: Need printing help - How to print on 1/4 the part of A4 paper on dot-matrix printer Pin
anand_study19-Feb-07 16:27
anand_study19-Feb-07 16:27 
GeneralRe: Need printing help - How to print on 1/4 the part of A4 paper on dot-matrix printer Pin
Mark Salsbery20-Feb-07 5:47
Mark Salsbery20-Feb-07 5:47 
GeneralRe: Need printing help - How to print on 1/4 the part of A4 paper on dot-matrix printer Pin
anand_study21-Feb-07 23:37
anand_study21-Feb-07 23:37 
GeneralRe: Need printing help - How to print on 1/4 the part of A4 paper on dot-matrix printer Pin
Mark Salsbery22-Feb-07 5:28
Mark Salsbery22-Feb-07 5:28 
GeneralRe: Need printing help - How to print on 1/4 the part of A4 paper on dot-matrix printer Pin
Mark Salsbery20-Feb-07 5:56
Mark Salsbery20-Feb-07 5:56 
Questionspamkiller by hirosh.. [modified] Pin
cheezuka19-Feb-07 7:21
cheezuka19-Feb-07 7:21 
QuestionRe: spamkiiller by hirosh.. Pin
David Crow19-Feb-07 7:24
David Crow19-Feb-07 7:24 
AnswerRe: spamkiiller by hirosh.. Pin
Ravi Bhavnani19-Feb-07 10:08
professionalRavi Bhavnani19-Feb-07 10:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.