Click here to Skip to main content
16,005,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Repainting the Window Pin
BobInNJ27-Dec-08 13:49
BobInNJ27-Dec-08 13:49 
GeneralRe: Repainting the Window Pin
Luc Pattyn27-Dec-08 15:15
sitebuilderLuc Pattyn27-Dec-08 15:15 
GeneralRe: Repainting the Window Pin
BobInNJ28-Dec-08 6:43
BobInNJ28-Dec-08 6:43 
GeneralRe: Repainting the Window Pin
Luc Pattyn28-Dec-08 14:15
sitebuilderLuc Pattyn28-Dec-08 14:15 
GeneralRe: Repainting the Window Pin
BobInNJ29-Dec-08 6:58
BobInNJ29-Dec-08 6:58 
GeneralRe: Repainting the Window Pin
Luc Pattyn29-Dec-08 7:13
sitebuilderLuc Pattyn29-Dec-08 7:13 
GeneralRe: Repainting the Window Pin
BobInNJ29-Dec-08 9:08
BobInNJ29-Dec-08 9:08 
GeneralRe: Repainting the Window Pin
Luc Pattyn29-Dec-08 9:55
sitebuilderLuc Pattyn29-Dec-08 9:55 
Hi Bob,

thanks for sharing the code.

I do still have some remarks:
1. IMO not erasing the background will result in artefacts, such as old text still showing
under new text.
2. you still are not using the updaterect the way it is intended:
your OnPaint should not test for boundaries being equal, it should basically consist of a
series of this pseudocode:
if (theRectThing1Affects.overlaps.with.updateRect) paint.thing1.in.theRectThing1Affects;
if (theRectThing2Affects.overlaps.with.updateRect) paint.thing2.in.theRectThing2Affects;
if (theRectThing3Affects.overlaps.with.updateRect) paint.thing3.in.theRectThing3Affects;

And of course you then should use real heights, i.e. adjust the rect1.bottom values.

The way you have it just may still cause a dirty window when an overlapping window with top==200
(or 300) gets removed.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Fixturized forever. Confused | :confused:


GeneralRe: Repainting the Window Pin
BobInNJ29-Dec-08 11:28
BobInNJ29-Dec-08 11:28 
GeneralRe: Repainting the Window Pin
Luc Pattyn29-Dec-08 14:58
sitebuilderLuc Pattyn29-Dec-08 14:58 
GeneralRe: Repainting the Window Pin
BobInNJ30-Dec-08 4:37
BobInNJ30-Dec-08 4:37 
AnswerRe: Repainting the Window [modified] Pin
BobInNJ29-Dec-08 9:03
BobInNJ29-Dec-08 9:03 
Questioncan you help me a recursion project with c++? Pin
silversword8626-Dec-08 8:58
silversword8626-Dec-08 8:58 
GeneralRe: can you help me a recursion project with c++? Pin
Luc Pattyn26-Dec-08 9:20
sitebuilderLuc Pattyn26-Dec-08 9:20 
Questionhtml res files don't seem to work anymore. Pin
Jim Crafton26-Dec-08 4:55
Jim Crafton26-Dec-08 4:55 
AnswerRe: html res files don't seem to work anymore. Pin
Richard Andrew x6426-Dec-08 5:10
professionalRichard Andrew x6426-Dec-08 5:10 
GeneralRe: html res files don't seem to work anymore. Pin
Jim Crafton26-Dec-08 5:13
Jim Crafton26-Dec-08 5:13 
GeneralRe: html res files don't seem to work anymore. Pin
Richard Andrew x6426-Dec-08 5:15
professionalRichard Andrew x6426-Dec-08 5:15 
GeneralRe: html res files don't seem to work anymore. Pin
Jim Crafton26-Dec-08 5:27
Jim Crafton26-Dec-08 5:27 
GeneralRe: html res files don't seem to work anymore. Pin
Richard Andrew x6426-Dec-08 5:30
professionalRichard Andrew x6426-Dec-08 5:30 
GeneralRe: html res files don't seem to work anymore. Pin
Richard Andrew x6426-Dec-08 5:47
professionalRichard Andrew x6426-Dec-08 5:47 
QuestionHow to get a desktop screenshot without my application window? [modified] Pin
midix26-Dec-08 3:08
midix26-Dec-08 3:08 
QuestionGetClipboard Data Pin
Davitor26-Dec-08 1:55
Davitor26-Dec-08 1:55 
QuestionGetting the error LNK2005 how to resolve this.I tried to set the properties but still i am finding the error at link Pin
pallaka25-Dec-08 21:37
pallaka25-Dec-08 21:37 
AnswerRe: Getting the error LNK2005 how to resolve this.I tried to set the properties but still i am finding the error at link Pin
Stuart Dootson25-Dec-08 22:21
professionalStuart Dootson25-Dec-08 22:21 

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.