Click here to Skip to main content
15,923,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralFinding proper documentation for AddIn Interfaces Pin
Franz Klein5-Dec-01 23:24
Franz Klein5-Dec-01 23:24 
GeneralError in calling resource function Pin
5-Dec-01 22:36
suss5-Dec-01 22:36 
GeneralBeginner : using .INI files Pin
Jerome Conus5-Dec-01 22:11
Jerome Conus5-Dec-01 22:11 
GeneralRe: Beginner : using .INI files Pin
Michael P Butler5-Dec-01 23:36
Michael P Butler5-Dec-01 23:36 
GeneralRe: Beginner : using .INI files Pin
Alvaro Mendez6-Dec-01 10:17
Alvaro Mendez6-Dec-01 10:17 
GeneralThread problem Pin
marutis5-Dec-01 21:57
marutis5-Dec-01 21:57 
QuestionDraw text without HDC, possible? Pin
Baling5-Dec-01 21:18
Baling5-Dec-01 21:18 
AnswerRe: Draw text without HDC, possible? Pin
Chambers6-Dec-01 2:23
Chambers6-Dec-01 2:23 
There are two main things which could cause flickering :

1.) Not using a memory HDC/CDC when updating the bitmap or text.

2.) Not overriding OnEraseBkgnd in your View class.

The problem is probably caused by no.1 since otherwise your whole bitmap would flicker upon refresh too. What I think maybe happening is your program is drawing the bitmap directly to the screen, quickly followed by the text. This leaves a very very short period in which you see just the bitmap, thus a flickering effect is caused. What I recommend you do is create a new CDC called SrcDC, and use CreateCompatibleDC(NULL), and select the bitmap into it. I would then create another dc called DestDC (in same way), and BitBlt the SrcDC to the DestDC. I would then draw the text onto the DestDC (this has the effect of drawing onto the class) using DestDC's TextOut() function, before *finally* BitBlt'ing the DestDC to the screens *pDC that is found in your OnDraw routine. Basically *only* the final image should be drawn to the screen in 1 BitBlt, there shouldn`t be any other routines which draw to the same *pDC after this or else flickering may occur. Hope this helped,

Alan.

"When I left you I was but the learner, now I am the Master" - Darth VaderMad | :mad:
GeneralRe: Draw text without HDC, possible? Pin
Baling6-Dec-01 5:11
Baling6-Dec-01 5:11 
QuestionHow to control Display Pin
binnu5-Dec-01 20:01
binnu5-Dec-01 20:01 
GeneralDynamic IP address Pin
5-Dec-01 19:16
suss5-Dec-01 19:16 
GeneralRe: Dynamic IP address Pin
Gennady Oster5-Dec-01 20:36
Gennady Oster5-Dec-01 20:36 
GeneralMost Impacting/Powerful Future Programming Language Pin
valikac5-Dec-01 18:19
valikac5-Dec-01 18:19 
GeneralAny 'C' equivalent to Code Project Pin
SAK5-Dec-01 14:39
SAK5-Dec-01 14:39 
GeneralRe: Any 'C' equivalent to Code Project Pin
Rickard Andersson205-Dec-01 21:27
Rickard Andersson205-Dec-01 21:27 
GeneralHTTP file download flow control help needed Pin
Wolfram Steinke5-Dec-01 13:48
Wolfram Steinke5-Dec-01 13:48 
GeneralRe: HTTP file download flow control help needed Pin
Joaquín M López Muñoz5-Dec-01 19:16
Joaquín M López Muñoz5-Dec-01 19:16 
GeneralRe: HTTP file download flow control help needed Pin
Wolfram Steinke6-Dec-01 10:33
Wolfram Steinke6-Dec-01 10:33 
GeneralRe: HTTP file download flow control help needed Pin
markkuk6-Dec-01 20:53
markkuk6-Dec-01 20:53 
GeneralRe: HTTP file download flow control help needed Pin
Wolfram Steinke6-Dec-01 21:07
Wolfram Steinke6-Dec-01 21:07 
GeneralRe: HTTP file download flow control help needed Pin
Ravi Bhavnani6-Dec-01 10:50
professionalRavi Bhavnani6-Dec-01 10:50 
GeneralDialog buttons problem Pin
et5-Dec-01 13:24
et5-Dec-01 13:24 
GeneralRe: Try to use SendMessage(...) Pin
Masaaki Onishi5-Dec-01 18:58
Masaaki Onishi5-Dec-01 18:58 
GeneralRe: Dialog buttons problem Pin
Michael Dunn5-Dec-01 19:16
sitebuilderMichael Dunn5-Dec-01 19:16 
GeneralDialog Menu Question Pin
Vu Nguyen5-Dec-01 12:45
Vu Nguyen5-Dec-01 12:45 

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.