Click here to Skip to main content
15,910,411 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRectangle Selection Pin
javi_jmc10-Jul-05 21:33
javi_jmc10-Jul-05 21:33 
GeneralRe: Rectangle Selection Pin
Jose Lamas Rios11-Jul-05 2:40
Jose Lamas Rios11-Jul-05 2:40 
GeneralRe: Rectangle Selection Pin
Blake Miller11-Jul-05 4:57
Blake Miller11-Jul-05 4:57 
GeneralMFC Calling .NET Pin
quesansii10-Jul-05 20:31
quesansii10-Jul-05 20:31 
GeneralMaking a dialog over everything - even games Pin
awah10-Jul-05 20:30
awah10-Jul-05 20:30 
GeneralRe: Making a dialog over everything - even games Pin
David Crow11-Jul-05 3:11
David Crow11-Jul-05 3:11 
GeneralRe: Making a dialog over everything - even games Pin
awah12-Jul-05 17:20
awah12-Jul-05 17:20 
Questiona paradox in mfc head file? Pin
wrb30210-Jul-05 20:29
wrb30210-Jul-05 20:29 
problem code:

pMetaFileDC->SelectObject(newPen);


when debug, it causes an assertion. the source is:


{ ASSERT(m_hDC == m_hAttribDC); // ASSERT a simple CDC object
return (hObject != NULL) ? ::SelectObject(m_hDC, hObject) : NULL; }

ok, then i write this:

pDoc->pMetaFileDC->SetAttribDC(pDoc->pMetaFileDC->GetSafeHdc());

but this fuciton do not work as supposed. and the assertion remains.

look into the source code:

void CMetaFileDC::SetAttribDC(HDC hDC) // Set the Attribute DC
{
if (hDC != m_hDC)
CDC::SetAttribDC(hDC);
if (m_hDC == m_hAttribDC) // if we somehow got to this, correct it
ReleaseAttribDC();
}

i am really confused! what am i supposed to do?

in addition, if i do nothing but use the release vision, i find it works quite well without any problem.

reference this:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/_core_the_trace_macro.asp[^]
AnswerRe: a paradox in mfc head file? Pin
David Crow11-Jul-05 3:44
David Crow11-Jul-05 3:44 
GeneralQuestion about displaying a property page Pin
PrashantJ10-Jul-05 20:14
PrashantJ10-Jul-05 20:14 
GeneralAbout building a Windows service Pin
zhaopi10-Jul-05 20:04
zhaopi10-Jul-05 20:04 
GeneralRe: About building a Windows service Pin
zhaopi10-Jul-05 20:07
zhaopi10-Jul-05 20:07 
GeneralRe: About building a Windows service Pin
Blake Miller11-Jul-05 5:02
Blake Miller11-Jul-05 5:02 
General16bit & 32bit Portability issues Pin
Anonymous10-Jul-05 19:25
Anonymous10-Jul-05 19:25 
GeneralRe: 16bit & 32bit Portability issues Pin
David Crow11-Jul-05 3:51
David Crow11-Jul-05 3:51 
GeneralNotification on CPU frequency change in SpeedStep Pin
Vitaly Kashkarov10-Jul-05 19:09
Vitaly Kashkarov10-Jul-05 19:09 
GeneralDirectSound Question Pin
Mark Keeling10-Jul-05 17:58
Mark Keeling10-Jul-05 17:58 
GeneralRe: DirectSound Question Pin
Trollslayer10-Jul-05 22:15
mentorTrollslayer10-Jul-05 22:15 
GeneralRe: DirectSound Question Pin
Mark Keeling12-Jul-05 13:56
Mark Keeling12-Jul-05 13:56 
GeneralRe: How to insert a record into table in the oracle Pin
Christian Graus10-Jul-05 17:35
protectorChristian Graus10-Jul-05 17:35 
QuestionHow to put a button on the main window Pin
shfinfrock10-Jul-05 15:14
shfinfrock10-Jul-05 15:14 
AnswerRe: How to put a button on the main window Pin
Jose Lamas Rios10-Jul-05 16:26
Jose Lamas Rios10-Jul-05 16:26 
Generalsend a GET, POST request to a HTTPS server Pin
surfman1910-Jul-05 10:22
surfman1910-Jul-05 10:22 
GeneralRe: send a GET, POST request to a HTTPS server Pin
Andrew Kirillov10-Jul-05 20:25
Andrew Kirillov10-Jul-05 20:25 
GeneralRe: send a GET, POST request to a HTTPS server Pin
surfman1917-Jul-05 4:55
surfman1917-Jul-05 4:55 

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.