Click here to Skip to main content
15,176,227 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: [solved] Declare & Use Gobal Variable in C (Just like Singleton Variable) Pin
Rick York12-May-17 8:19
mveRick York12-May-17 8:19 
QuestionCTreeCtrl with CustomDraw Flickering Pin
SamwisePl5-May-17 1:29
MemberSamwisePl5-May-17 1:29 
AnswerRe: CTreeCtrl with CustomDraw Flickering Pin
Richard MacCutchan5-May-17 1:58
mveRichard MacCutchan5-May-17 1:58 
GeneralRe: CTreeCtrl with CustomDraw Flickering Pin
SamwisePl5-May-17 2:17
MemberSamwisePl5-May-17 2:17 
GeneralRe: CTreeCtrl with CustomDraw Flickering Pin
Richard MacCutchan5-May-17 2:48
mveRichard MacCutchan5-May-17 2:48 
AnswerRe: CTreeCtrl with CustomDraw Flickering Pin
Victor Nijegorodov5-May-17 7:00
MemberVictor Nijegorodov5-May-17 7:00 
GeneralRe: CTreeCtrl with CustomDraw Flickering Pin
SamwisePl7-May-17 20:46
MemberSamwisePl7-May-17 20:46 
AnswerRe: CTreeCtrl with CustomDraw Flickering Pin
leon de boer7-May-17 4:18
Memberleon de boer7-May-17 4:18 
There double buffering technique that is fairly trivial to implement and gives reasonable results for any complex drawing

1.) Your draw routines only draw on a memory context, don't draw to the screen at all in those item draw calls.
2.) You use a standard windows timer which will timeout after a set time and you use that to update the screen.
3.) Anytime you draw to the memory context in step 1 you kill the running any timer and restart it
4.) The timer running out posts off a message and if you use that message to transfer the memory DC to screen, you then dispose of the timer.

You should be able to get what happens that each item simply draws itself to the memory DC and will restart the timer. When the last item has been drawn the timer will finally hit it's wait timeout and post off the message which will draw all the items together as one big bitblt draw and no flickering.

The requirements 1 memory context (created when window is created), 1 timer which is created and disposed as per above.
In vino veritas

GeneralRe: CTreeCtrl with CustomDraw Flickering Pin
SamwisePl7-May-17 20:47
MemberSamwisePl7-May-17 20:47 
AnswerRe: CTreeCtrl with CustomDraw Flickering Pin
SamwisePl15-May-17 20:15
MemberSamwisePl15-May-17 20:15 
GeneralRe: CTreeCtrl with CustomDraw Flickering Pin
leon de boer15-May-17 20:26
Memberleon de boer15-May-17 20:26 
QuestionWinBioIdentify() function causing to stop service "WbioSrvc " when match found? Pin
Premnath Mali4-May-17 20:28
professionalPremnath Mali4-May-17 20:28 
Questionambiguity in multiple inheritance Pin
Member 1315992028-Apr-17 21:17
MemberMember 1315992028-Apr-17 21:17 
AnswerRe: ambiguity in multiple inheritance Pin
Richard MacCutchan28-Apr-17 22:34
mveRichard MacCutchan28-Apr-17 22:34 
AnswerRe: ambiguity in multiple inheritance Pin
Jochen Arndt28-Apr-17 22:44
professionalJochen Arndt28-Apr-17 22:44 
QuestionEmbedding Python in C++ Pin
Member 1312483628-Apr-17 18:06
MemberMember 1312483628-Apr-17 18:06 
QuestionVisual studio Pin
Member 1315949628-Apr-17 12:06
MemberMember 1315949628-Apr-17 12:06 
AnswerRe: Visual studio Pin
jeron128-Apr-17 12:14
Memberjeron128-Apr-17 12:14 
QuestionRe: Visual studio Pin
David Crow28-Apr-17 16:59
MemberDavid Crow28-Apr-17 16:59 
Questionerror LNK2019: unresolved external symbol __stdio_common_vsprintf referenced in function sprint VS 2015 Pro Windows 10 Pin
ForNow28-Apr-17 10:00
MemberForNow28-Apr-17 10:00 
AnswerRe: error LNK2019: unresolved external symbol __stdio_common_vsprintf referenced in function sprint VS 2015 Pro Windows 10 Pin
Jochen Arndt28-Apr-17 23:12
professionalJochen Arndt28-Apr-17 23:12 
GeneralRe: error LNK2019: unresolved external symbol __stdio_common_vsprintf referenced in function sprint VS 2015 Pro Windows 10 Pin
ForNow29-Apr-17 17:49
MemberForNow29-Apr-17 17:49 
QuestionHelp Pin
Member 1302311827-Apr-17 6:29
MemberMember 1302311827-Apr-17 6:29 
AnswerRe: Help Pin
Dave Kreskowiak27-Apr-17 7:04
mveDave Kreskowiak27-Apr-17 7:04 
AnswerRe: Help Pin
ThatsAlok11-May-17 21:47
MemberThatsAlok11-May-17 21:47 

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.