Click here to Skip to main content
15,913,941 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralLooking for Algorithm to match RGB values Pin
Wolfram Steinke21-Mar-01 13:42
Wolfram Steinke21-Mar-01 13:42 
GeneralRe: Looking for Algorithm to match RGB values Pin
22-Mar-01 0:01
suss22-Mar-01 0:01 
GeneralRe: Looking for Algorithm to match RGB values Pin
Christian Graus22-Mar-01 11:46
protectorChristian Graus22-Mar-01 11:46 
GeneralPlease help save my sanity... Pin
21-Mar-01 10:16
suss21-Mar-01 10:16 
GeneralRe: Please help save my sanity... Pin
Michael Dunn21-Mar-01 16:52
sitebuilderMichael Dunn21-Mar-01 16:52 
GeneralReplacing ComboBox arrow-button Pin
21-Mar-01 9:41
suss21-Mar-01 9:41 
GeneralHelp me Please! Bitmap UI probs Pin
21-Mar-01 8:36
suss21-Mar-01 8:36 
GeneralRe: Help me Please! Bitmap UI probs Pin
Chris Losinger21-Mar-01 9:29
professionalChris Losinger21-Mar-01 9:29 
first, you probably shouldn't call OnPaint yourself. a better way is to call Invalidate(FALSE); this has much the same effect as calling OnPaint directly, in fact it will end up calling your OnPaint eventually, but does some other nice thigns, too. read the help for Invalidate and InvalidateRect, they're nice functions.

second, if you're getting flickering, then you are trying to draw too much stuff at once. in OnPaint, you need to determine what needs to be drawn: call CDC::GetClipBox to get the rectangle that needs to be updated and only paint that part.

another way to reduce flickering, but this only really helps if you're doing multiple draws, and not just a single bitblt, is to render onto an off-screen dc then bitblt the whole thing at once.

yet another way to reduce flickering, and one that might help you, is to override the OnEraseBackground function (use classwizard). just return FALSE;. this tells MFC not to re-paint the window's background every time it redraws.

-c

------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
GeneralRe: Help me Please! Bitmap UI probs Pin
21-Mar-01 9:52
suss21-Mar-01 9:52 
GeneralRe: Help me Please! Bitmap UI probs Pin
Chris Losinger21-Mar-01 11:26
professionalChris Losinger21-Mar-01 11:26 
GeneralRe: Help me Please! Bitmap UI probs Pin
Michael Dunn21-Mar-01 16:58
sitebuilderMichael Dunn21-Mar-01 16:58 
GeneralRe: Help me Please! Bitmap UI probs Pin
22-Mar-01 12:03
suss22-Mar-01 12:03 
GeneralRe: Help me Please! Bitmap UI probs Pin
23-Mar-01 9:14
suss23-Mar-01 9:14 
QuestionHow to turn status bar, menu bar, tool bar, title bar off? Pin
Richard Cheng21-Mar-01 6:23
Richard Cheng21-Mar-01 6:23 
GeneralAccelerator Pin
confalonieri21-Mar-01 3:57
confalonieri21-Mar-01 3:57 
QuestionCComboBox - how to react to enter i editbox? Pin
21-Mar-01 2:19
suss21-Mar-01 2:19 
AnswerRe: CComboBox - how to react to enter i editbox? Pin
PJ Arends22-Mar-01 6:22
professionalPJ Arends22-Mar-01 6:22 
QuestionDundas Ultimate Grid -- enhanced Version? Pin
Uwe Keim20-Mar-01 19:21
sitebuilderUwe Keim20-Mar-01 19:21 
AnswerRe: Dundas Ultimate Grid -- enhanced Version? Pin
Holger Persch20-Mar-01 19:48
Holger Persch20-Mar-01 19:48 
GeneralWeb Accessories Pin
Marcelo Nogueira Magri20-Mar-01 14:50
Marcelo Nogueira Magri20-Mar-01 14:50 
GeneralRe: Web Accessories Pin
Erik Thompson21-Mar-01 7:48
sitebuilderErik Thompson21-Mar-01 7:48 
GeneralSetWindowsHookEx Pin
Conor Hunt20-Mar-01 10:38
Conor Hunt20-Mar-01 10:38 
GeneralRe: SetWindowsHookEx Pin
Michael Dunn20-Mar-01 18:04
sitebuilderMichael Dunn20-Mar-01 18:04 
Generaldialogbox Pin
20-Mar-01 8:23
suss20-Mar-01 8:23 
GeneralRe: dialogbox Pin
Christian Graus20-Mar-01 11:53
protectorChristian Graus20-Mar-01 11:53 

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.