What is the use of CObject::Dump function ?
Answers were Sorted based on User's Feedback
Answer / preeja
Dumps the contents of your object.When you write your own
class, you should override the Dump function to provide
diagnostic services for yourself and other users of your
class. The overridden Dump usually calls the Dump function
of its base class before printing data members unique to
the derived class.
Dump function should not print a newline character at the
end of its output.Dump is a const function, you are not
permitted to change the object state during the dump.
// example for CObject::Dump
void CAge::Dump( CDumpContext &dc ) const
{
CObject::Dump( dc );
dc << "Age = " << m_years;
}
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / abhijit
* intended to produce shallow snapshot
* should dump information about its members that are not
inherited
* can set depth detail through SetDepth()
* by default, information is dumped on trace window.
however, this may be altered in InitInstance():
afxDump.m_pFile = pFile;
cleanup code in ExitInstance():
afxDump.Flush();
afxDump.Close();
delete afxDump.m_pFile;
afxDump.m_pFile = NULL;
| Is This Answer Correct ? | 0 Yes | 6 No |
How to update all the views whenver document got updated ?
What function is used to disable a control at runtime?
1)How to change a text of a button in runtime?
How WM_PAINT message gets called in MFC,please explain it . a)Who calls the WM_PAINT message? b)When it gets called? c)how it comes to message queue? Please Explain it
In MFC By Using Communication Between Dialog Boxes,How Can We Send Message Of one Dialog Box To Another Dialog.?
3 Answers Financial Technologies,
General purpose classes in MFC
is there any class which is not derived from Cobject
what is the meaning of constant FILE EXCEEDS LENGTH LIMIT while loading from ps file to vsam in the jcl?
How to access document object from view ?
Do you have an idea about MFC?
What is subclassing?
Which CPrintInfo member variable must be set for multiple page printouts?