Click here to Skip to main content
16,006,378 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Frustrating.. Pin
H.P.23-Feb-02 3:54
H.P.23-Feb-02 3:54 
GeneralRe: Frustrating.. Pin
Joaquín M López Muñoz23-Feb-02 8:57
Joaquín M López Muñoz23-Feb-02 8:57 
Generalwindow messages.. Pin
Neha23-Feb-02 2:35
Neha23-Feb-02 2:35 
GeneralRe: window messages.. Pin
Tim Deveaux23-Feb-02 5:02
Tim Deveaux23-Feb-02 5:02 
GeneralRe: window messages.. Pin
Ravi Bhavnani23-Feb-02 5:15
professionalRavi Bhavnani23-Feb-02 5:15 
GeneralBeginner in painting Pin
Mazdak23-Feb-02 2:14
Mazdak23-Feb-02 2:14 
GeneralRe: Beginner in painting Pin
Tim Deveaux23-Feb-02 4:19
Tim Deveaux23-Feb-02 4:19 
GeneralRe: Beginner in painting Pin
Paul M Watt23-Feb-02 10:18
mentorPaul M Watt23-Feb-02 10:18 
It is also important to remember that if you go this route, that you must call ValidateRect or ValidateRgn if you decide to go this route. If you don't, the invalid region for the window that is receiving the paint message will not be erased, and this window will continue to receive these paint messages even when there is no need to paint, kind of like an infinite loop of paints.

Also, when you use GetDC, you will be given a DC that has the ability to paint on the entire window, depending on the type of painting that you are doing, this may cause flickering. That is why if you use this technique, again, you should call GetInvalidRgn on the window, before you call ValidateRect or ValidateRgn.

Usually you would use this technique if you want to perform painting outside of the paint handler.

Even if you use the CS_OWNDC style in your window class, when you call BeginPaint, it will return the same DC that is cached by your window. I believe that this is your best route, to making the best looking window.

Remember, there are only so many resources available on the system, and you should weigh the circumstances of your window design carefully before you try to cache window DC's. You do not need to worry about this so much on the NT based systems, however the 9x systems have a limited number of concurrent DC's that can be created.

I know alot about the internals of the Windows paint architecture, if you need any more information, please let me know.
GeneralRe: Beginner in painting Pin
Ravi Bhavnani23-Feb-02 4:48
professionalRavi Bhavnani23-Feb-02 4:48 
GeneralRe: Beginner in painting Pin
Christian Graus23-Feb-02 10:42
protectorChristian Graus23-Feb-02 10:42 
GeneralRe: Beginner in painting Pin
Mazdak23-Feb-02 20:42
Mazdak23-Feb-02 20:42 
GeneralRe: Beginner in painting Pin
Christian Graus23-Feb-02 21:05
protectorChristian Graus23-Feb-02 21:05 
GeneralLPTSTR type Pin
23-Feb-02 2:07
suss23-Feb-02 2:07 
GeneralRe: LPTSTR type Pin
Anders Molin23-Feb-02 5:52
professionalAnders Molin23-Feb-02 5:52 
GeneralRe: LPTSTR type Pin
Rick York23-Feb-02 7:02
mveRick York23-Feb-02 7:02 
GeneralRe: LPTSTR type Pin
Anders Molin23-Feb-02 7:19
professionalAnders Molin23-Feb-02 7:19 
GeneralRe: LPTSTR type Pin
Rick York23-Feb-02 7:32
mveRick York23-Feb-02 7:32 
GeneralRe: LPTSTR type Pin
23-Feb-02 8:24
suss23-Feb-02 8:24 
GeneralRe: LPTSTR type Pin
Michael Dunn23-Feb-02 11:36
sitebuilderMichael Dunn23-Feb-02 11:36 
GeneralRe: LPTSTR type Pin
Felix Cho23-Feb-02 7:24
Felix Cho23-Feb-02 7:24 
GeneralRe: LPTSTR type Pin
Michael Dunn23-Feb-02 7:57
sitebuilderMichael Dunn23-Feb-02 7:57 
QuestionDo anyone know where can we get some information about CD's file struct? Pin
MeteOS323-Feb-02 1:55
MeteOS323-Feb-02 1:55 
AnswerRe: Do anyone know where can we get some information about CD's file struct? Pin
markkuk24-Feb-02 21:40
markkuk24-Feb-02 21:40 
GeneralGDI+ AlphaBlending Pin
AJ12323-Feb-02 1:55
AJ12323-Feb-02 1:55 
GeneralRe: GDI+ AlphaBlending Pin
Christian Graus23-Feb-02 10:46
protectorChristian Graus23-Feb-02 10:46 

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.