Advertisement

03.23.2002 at 08:52AM PST, ID: 20280720
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.6

How can I see a CTime variable using the debugger QuickWatch window

Asked by emitchell in Windows MFC Programming

Tags: , ,

I have a number of CTime variables and when I ask to see them in the debugger they show as {time=0x3982f170} for my variable startTime.  What I'd like to see is 2Mar2002 10:11:53.

I can do this by inserting code after the variable is set as:

CString sTime = startTime.Format(_T("%c"));

and I can look at the sTime to see the full date and time for the locale.

This is a pain to have to insert these lines every time I want to look at a time value.

I think it should be possible to define a function in my project as:

CString ShowTime(CTime& time)
{
    return time.Format(_T("%c"));
}
Just to make sure that the routine was loaded, I added the following line directly after my unknown variable as:

CString sTime = ShowTime(startTime);

When I step to this point, sure enough I can display the value of sTime.

What I'd really like to do would be to use the ShowTime function in the QuickWatch window. However, when I type ShowTime(startTime) in QuickWatch, there is a message generated in the Value column:

Error: cannot display value

I tried putting a TRACE inside the function so possibly something would show up in the debug window but no such luck.

The general question really is: How can one invoke a function in the QuickWatch window so that it's output value is displayed?
Start Free Trial
 
Keywords: How can I see a CTime variable using t…
 
Loading Advertisement...
 
[+][-]03.23.2002 at 11:22AM PST, ID: 6891205

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.23.2002 at 01:07PM PST, ID: 6891335

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.23.2002 at 07:42PM PST, ID: 6891777

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Windows MFC Programming
Tags: quickwatch, debug, display
Sign Up Now!
Solution Provided By: Triskelion
Participating Experts: 3
Solution Grade: A
 
 
[+][-]03.24.2002 at 07:19AM PST, ID: 6892192

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.26.2002 at 06:57AM PST, ID: 6896517

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.26.2002 at 12:07PM PST, ID: 6897454

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.26.2002 at 12:59PM PST, ID: 6897557

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.26.2002 at 07:25PM PST, ID: 6898252

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.06.2004 at 04:44AM PDT, ID: 10764847

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]04.10.2004 at 04:35PM PDT, ID: 10799087

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44