Click here to Skip to main content
15,886,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
PotatoSoup6-Apr-20 12:52
PotatoSoup6-Apr-20 12:52 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
Greg Utas6-Apr-20 12:55
professionalGreg Utas6-Apr-20 12:55 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
PotatoSoup6-Apr-20 18:58
PotatoSoup6-Apr-20 18:58 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
Greg Utas7-Apr-20 0:05
professionalGreg Utas7-Apr-20 0:05 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
Victor Nijegorodov6-Apr-20 20:42
Victor Nijegorodov6-Apr-20 20:42 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
Member 1507871612-Jul-22 14:20
Member 1507871612-Jul-22 14:20 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
Richard MacCutchan6-Apr-20 21:42
mveRichard MacCutchan6-Apr-20 21:42 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
PotatoSoup9-Apr-20 8:50
PotatoSoup9-Apr-20 8:50 
SOLVED (partially).

I did not need to add listboxes to the back buffer for my program to be basically usable at this time, but I still would like to know how to add listboxes to a back buffer if it is possible as I requested in my *original* post. For that no one here helped me at all in the least.

I did get help getting past a problem, and that was a partial solve. I explain now:


Thank you Richard MacCutchan. If the code is not working, then go back to the basics and debug from there. Thanks, Richard MacCutchan.

Microsoft's CreateWindowExA function (winuser.h) - Win32 apps | Microsoft Docs[^] , which is their page for CreateWindowEx, states: (my underlining)

Quote:
With WS_EX_COMPOSITED set, all descendants of a window get bottom-to-top painting order using double-buffering. Bottom-to-top painting order allows a descendent window to have translucency (alpha) and transparency (color-key) effects, but only if the descendent window also has the WS_EX_TRANSPARENT bit set. Double-buffering allows the window and its descendents to be painted without flicker.


I should have already had that in my code. I looked and it was not there.

From Microsoft: (my underlining)
Quote:
HWND CreateWindowExA(
DWORDdwExStyle,
LPCSTR lpClassName,
LPCSTR lpWindowName,
DWORD dwStyle,
int X,
int Y,
int nWidth,
int nHeight,
HWND hWndParent,
HMENU hMenu,
HINSTANCE hInstance,
LPVOID lpParam
);


My dwStyle was WS_OVERLAPPEDWINDOW, and it should have been WS_OVERLAPPEDWINDOW | WS_EX_COMPOSITED,. I updated it.

Note to future readers: Do not forget to use this WS_OVERLAPPEDWINDOW | WS_EX_COMPOSITED, together when needed.

I found it myself. But, you all did help. I would like to give you all a "+" for your help.

Some of you helped in off-topic replies that were logical to consider when debugging in general. I have found that debugging is almost more important than coding. Thus, for each and every one of you, I thank you.

Thank you codeproject.com .

Thank God for allowing me to find the answer.

modified 9-Apr-20 15:15pm.

GeneralRe: How do I add listboxes to a back buffer and use that? Pin
Victor Nijegorodov9-Apr-20 22:12
Victor Nijegorodov9-Apr-20 22:12 
AnswerRe: How do I add listboxes to a back buffer and use that? Pin
PotatoSoup6-Apr-20 11:59
PotatoSoup6-Apr-20 11:59 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
leon de boer6-Apr-20 20:42
leon de boer6-Apr-20 20:42 
AnswerRe: How do I add listboxes to a back buffer and use that? Pin
leon de boer6-Apr-20 20:31
leon de boer6-Apr-20 20:31 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
PotatoSoup7-Apr-20 18:08
PotatoSoup7-Apr-20 18:08 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
leon de boer7-Apr-20 19:05
leon de boer7-Apr-20 19:05 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
Richard MacCutchan7-Apr-20 21:58
mveRichard MacCutchan7-Apr-20 21:58 
QuestionRe: How do I add listboxes to a back buffer and use that? Pin
David Crow8-Apr-20 1:58
David Crow8-Apr-20 1:58 
AnswerRe: How do I add listboxes to a back buffer and use that? Pin
leon de boer8-Apr-20 4:03
leon de boer8-Apr-20 4:03 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
David Crow8-Apr-20 4:25
David Crow8-Apr-20 4:25 
Questionbasic MFC app Pin
Calin Negru6-Apr-20 0:30
Calin Negru6-Apr-20 0:30 
AnswerRe: basic MFC app Pin
Richard MacCutchan6-Apr-20 0:49
mveRichard MacCutchan6-Apr-20 0:49 
GeneralRe: basic MFC app Pin
Calin Negru6-Apr-20 1:02
Calin Negru6-Apr-20 1:02 
GeneralRe: basic MFC app Pin
Richard MacCutchan6-Apr-20 1:49
mveRichard MacCutchan6-Apr-20 1:49 
AnswerRe: basic MFC app Pin
Victor Nijegorodov6-Apr-20 3:07
Victor Nijegorodov6-Apr-20 3:07 
AnswerRe: basic MFC app Pin
Victor Nijegorodov6-Apr-20 3:17
Victor Nijegorodov6-Apr-20 3:17 
GeneralRe: basic MFC app Pin
Calin Negru6-Apr-20 3:46
Calin Negru6-Apr-20 3: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.