Click here to Skip to main content
15,924,039 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ObjectARX Pin
Libor Matejka14-Aug-01 0:35
Libor Matejka14-Aug-01 0:35 
QuestionCan I keep a CBitmap dc in memory Pin
Craig Miller8-Aug-01 7:45
Craig Miller8-Aug-01 7:45 
AnswerRe: Can I keep a CBitmap dc in memory Pin
Christian Graus8-Aug-01 12:31
protectorChristian Graus8-Aug-01 12:31 
GeneralRe: Can I keep a CBitmap dc in memory Pin
Craig Miller9-Aug-01 7:02
Craig Miller9-Aug-01 7:02 
GeneralRe: Can I keep a CBitmap dc in memory Pin
Christian Graus9-Aug-01 11:31
protectorChristian Graus9-Aug-01 11:31 
GeneralRe: Can I keep a CBitmap dc in memory Pin
Craig Miller9-Aug-01 12:12
Craig Miller9-Aug-01 12:12 
GeneralRe: Can I keep a CBitmap dc in memory Pin
Christian Graus9-Aug-01 12:28
protectorChristian Graus9-Aug-01 12:28 
GeneralRe: Can I keep a CBitmap dc in memory Pin
Craig Miller9-Aug-01 12:54
Craig Miller9-Aug-01 12:54 
I see now, so I will have to worry about this when for instance I open up another image using the same dc right?

Currently, I have the following code in my LoadImage(...) method
if(m_dc != NULL)
     dc.deleteDC();

m_dc.CreateCompatibleDC(NULL);
CBitmap *pOldBm = m_dibMask.MakeBitmap(...);

So, for the dc.deleteDC() do I need to worry about saving the old bitmap? Or, does deleting the dc pretty much mean I'm starting with a clean one again without worrying about selecting the old bitmap back in?

Thanks again for all of your great help to get me to understand how all this dc stuff works,

Craig
GeneralRe: Can I keep a CBitmap dc in memory Pin
Christian Graus9-Aug-01 13:05
protectorChristian Graus9-Aug-01 13:05 
GeneralSTL weirdness Pin
#realJSOP8-Aug-01 7:42
professional#realJSOP8-Aug-01 7:42 
GeneralRe: STL weirdness Pin
Chris Losinger8-Aug-01 8:25
professionalChris Losinger8-Aug-01 8:25 
GeneralRe: STL weirdness Pin
Todd Smith8-Aug-01 10:47
Todd Smith8-Aug-01 10:47 
GeneralRe: STL weirdness Pin
Tomasz Sowinski9-Aug-01 3:22
Tomasz Sowinski9-Aug-01 3:22 
GeneralRe: STL weirdness Pin
Christian Graus8-Aug-01 12:23
protectorChristian Graus8-Aug-01 12:23 
GeneralRe: STL weirdness Pin
8-Aug-01 12:53
suss8-Aug-01 12:53 
GeneralRe: STL weirdness Pin
Philippe Mori9-Aug-01 4:09
Philippe Mori9-Aug-01 4:09 
Questionthe heap vs the stack? Pin
8-Aug-01 1:43
suss8-Aug-01 1:43 
AnswerRe: the heap vs the stack? Pin
Jake Palmer8-Aug-01 9:11
Jake Palmer8-Aug-01 9:11 
GeneralRe: the heap vs the stack? Pin
James Brown8-Aug-01 9:34
James Brown8-Aug-01 9:34 
GeneralMinimized/Maximized Pin
8-Aug-01 0:56
suss8-Aug-01 0:56 
GeneralRe: Minimized/Maximized Pin
8-Aug-01 1:06
suss8-Aug-01 1:06 
GeneralRe: Minimized/Maximized Pin
8-Aug-01 1:46
suss8-Aug-01 1:46 
GeneralRe: Minimized/Maximized Pin
8-Aug-01 6:40
suss8-Aug-01 6:40 
QuestionWhich method of CFile can delete a specified part from owner ??? Pin
8-Aug-01 0:28
suss8-Aug-01 0:28 
GeneralThe "x" button Pin
8-Aug-01 0:15
suss8-Aug-01 0:15 

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.