Click here to Skip to main content
15,895,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Help Needed Controlling other application using VC++ Pin
Kushagra Tiwari7-Nov-09 0:12
Kushagra Tiwari7-Nov-09 0:12 
QuestionArray help in cpp Pin
Pierre-Andre Malborugh6-Nov-09 14:36
Pierre-Andre Malborugh6-Nov-09 14:36 
AnswerRe: Array help in cpp Pin
Hans Dietrich6-Nov-09 15:08
mentorHans Dietrich6-Nov-09 15:08 
QuestionNeed some Help ON DLL Thank You Pin
VB_Crazy6-Nov-09 12:38
VB_Crazy6-Nov-09 12:38 
QuestionMFC Application Scroll bar issue on PDF Viewer Pin
kasi146-Nov-09 11:31
kasi146-Nov-09 11:31 
AnswerRe: MFC Application Scroll bar issue on PDF Viewer Pin
Garth J Lancaster6-Nov-09 13:57
professionalGarth J Lancaster6-Nov-09 13:57 
GeneralRe: MFC Application Scroll bar issue on PDF Viewer Pin
kasi149-Nov-09 6:08
kasi149-Nov-09 6:08 
QuestionBreakpoints in Wincore.cpp Pin
Member 36807856-Nov-09 5:50
Member 36807856-Nov-09 5:50 
I have been trying to correct an assertion failure in an MFC app for the last few days. It's been really fun... while the rest of you have been doing boring things like riding your outlandish motorcycles or bar-hopping with your chubby girlfriends, I get to really spend some quality time trying to comprehend things like "___Afx_4_U_T_q_HowDoesThisEvenCompile_<t>".

Anyhoo... an assertion fails somewhere in Wincore.cpp (a local called pMap comes up as 0, implying a call from the wrong thread, I am thinking). When the failure occurs, Visual Studio breaks into Wincore.cpp (which it finds and opens) and does a good job of debugging. It shows a call stack, "Watch" and "Quickwatch" seem to work, etc.

The problem arises when I try to do some manual editing to Wincore.cpp, or even just set a breakpoint in Wincore.cpp. It quickly becomes obvious that even though Visual Studio itself found and opened this file just a moment ago, it is not actually using the copy of Wincore.cpp that I am seeing as part of the build process. So, I can make garbage edits to it, do a "Rebuild All," and still get no errors. This seems completely wrong to me and provokes my ire at a very fundamental level. I mean, I guess Microsoft and I have different definitions of terms like "compile" and "source code."

When I try to simply set a breakpoint in Wincore.cpp without changing it, the breakpoint's red dot indicator goes "hollow" at runtime. When I hover over the breakpoint, Visual Studio tells me that the source code is different from that used in compilation. If I check "allow location to be different" in the breakpoint properties, then the breakpoint gets hit, but Visual Studio claims to have no source code. It prompts me to browse to the original source code. Strangely, there is a text field in this dialog showing where the source code originally resided, and this is some path on F:-drive (which, in my case, is a removable flash drive that isn't even present in the system).

I'm not sure how much more "original" I can get than the file I'm TRYING to use, which is in a subfolder of C:\Program Files\Microsoft Visual Studio 2008\ and was opened up for me by Visual Studio. Am I expected to e-mail Raymond Chen for the copy on his hard drive perhaps?

Generally, I don't need to edit Wincore.cpp; I would never do this permanently. Also, I suppose I haven't had much experience setting breakpoints in that file. However, I think that what I am trying to do should be possible, and I think that Visual Studio's behavior is very misleading. Am I or am I not building a file called Wincore.cpp into my project? The IDE really seems to want to have it both ways.

Perhaps I simply have something configured wrong?

Are "precompiled headers" causing the problem? (I don't think so, since Wincore.cpp is not really a "header" file; BUT, in my miserable experience with Visual C++, "precompiled headers" are one of Microsoft's most popular implements of torture. )

Also, if anyone has some different advice about how I ought to find the problem, that's very welcome too. I don't give a flip about Wincore.cpp or understanding it. I just want to fix my problem.
AnswerRe: Breakpoints in Wincore.cpp Pin
Rajesh R Subramanian6-Nov-09 6:26
professionalRajesh R Subramanian6-Nov-09 6:26 
AnswerRe: Breakpoints in Wincore.cpp Pin
sashoalm6-Nov-09 6:32
sashoalm6-Nov-09 6:32 
AnswerRe: Breakpoints in Wincore.cpp Pin
Randor 6-Nov-09 7:15
professional Randor 6-Nov-09 7:15 
QuestionCDatabase::OpenEx failure kills UI thread Pin
Gary Wheeler6-Nov-09 5:13
Gary Wheeler6-Nov-09 5:13 
QuestionRe: CDatabase::OpenEx failure kills UI thread Pin
Randor 6-Nov-09 6:25
professional Randor 6-Nov-09 6:25 
AnswerRe: CDatabase::OpenEx failure kills UI thread Pin
Gary Wheeler6-Nov-09 8:35
Gary Wheeler6-Nov-09 8:35 
QuestionRunning task on shutdown Pin
__DanC__6-Nov-09 2:29
__DanC__6-Nov-09 2:29 
AnswerRe: Running task on shutdown Pin
Randor 6-Nov-09 6:08
professional Randor 6-Nov-09 6:08 
GeneralRe: Running task on shutdown Pin
Rajesh R Subramanian6-Nov-09 6:09
professionalRajesh R Subramanian6-Nov-09 6:09 
GeneralRe: Running task on shutdown Pin
__DanC__6-Nov-09 6:18
__DanC__6-Nov-09 6:18 
GeneralRe: Running task on shutdown Pin
Randor 6-Nov-09 6:51
professional Randor 6-Nov-09 6:51 
GeneralRe: Running task on shutdown Pin
__DanC__6-Nov-09 6:53
__DanC__6-Nov-09 6:53 
GeneralRe: Running task on shutdown Pin
Randor 6-Nov-09 7:07
professional Randor 6-Nov-09 7:07 
QuestionCreate Split Window in RightView of SDI Pin
Abinash Mohanty5-Nov-09 23:16
Abinash Mohanty5-Nov-09 23:16 
AnswerRe: Create Split Window in RightView of SDI Pin
Adam Roderick J5-Nov-09 23:22
Adam Roderick J5-Nov-09 23:22 
AnswerRe: Create Split Window in RightView of SDI Pin
jinlsg8-Nov-09 14:15
jinlsg8-Nov-09 14:15 
Questionwhere is my fault? Pin
goutom roy5-Nov-09 23:10
goutom roy5-Nov-09 23:10 

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.