Click here to Skip to main content
15,885,546 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: red squiggly line - misspelt words Pin
Hans Dietrich13-May-11 13:09
mentorHans Dietrich13-May-11 13:09 
GeneralRe: red squiggly line - misspelt words Pin
Albert Holguin13-May-11 13:13
professionalAlbert Holguin13-May-11 13:13 
GeneralRe: red squiggly line - misspelt words Pin
Mark Salsbery13-May-11 14:03
Mark Salsbery13-May-11 14:03 
GeneralRe: red squiggly line - misspelt words Pin
Hans Dietrich13-May-11 20:09
mentorHans Dietrich13-May-11 20:09 
AnswerRe: red squiggly line - misspelt words Pin
Chris Losinger14-May-11 5:32
professionalChris Losinger14-May-11 5:32 
Questiondetect memory leak by _CrtDumpMemoryLeaks(); Pin
includeh1013-May-11 2:57
includeh1013-May-11 2:57 
AnswerRe: detect memory leak by _CrtDumpMemoryLeaks(); Pin
Albert Holguin13-May-11 4:47
professionalAlbert Holguin13-May-11 4:47 
AnswerRe: detect memory leak by _CrtDumpMemoryLeaks(); Pin
Mark Salsbery13-May-11 5:09
Mark Salsbery13-May-11 5:09 
I use a global object of a class that wraps the memory state functions. Easier than trying to find a place in running code to call the functions.

Here's an example:

#ifdef _DEBUG

class _MemStateCheck
{
	public:
		CMemoryState oldMemState, newMemState, diffMemState;

		_MemStateCheck();
		~_MemStateCheck();
};

_MemStateCheck::_MemStateCheck()
{
	 oldMemState.Checkpoint();
}

_MemStateCheck::~_MemStateCheck()
{
    newMemState.Checkpoint();
    if( diffMemState.Difference( oldMemState, newMemState ) )
    {
        TRACE( "************************\n" );
        TRACE( "Memory leaks Detected\n" );
        TRACE( "************************\n" );
		  diffMemState.DumpStatistics();
		  diffMemState.DumpAllObjectsSince();
    }
	 else
	 {
        TRACE( "************************\n" );
        TRACE( "No memory leaks Detected\n" );
        TRACE( "************************\n" );
	 }
}

_MemStateCheck MemCheckObj;
#endif  //#ifdef _DEBUG

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

AnswerRe: detect memory leak by _CrtDumpMemoryLeaks(); Pin
Chris Losinger14-May-11 5:34
professionalChris Losinger14-May-11 5:34 
QuestionLine break in CRichEdit Control Pin
si_6913-May-11 0:34
si_6913-May-11 0:34 
AnswerRe: Line break in CRichEdit Control Pin
si_6913-May-11 0:43
si_6913-May-11 0:43 
Questionwindows media encoder screen capture Pin
Member 296547113-May-11 0:21
Member 296547113-May-11 0:21 
Questionhow to built popup and attach to listcontrol Pin
rjkg12-May-11 23:44
rjkg12-May-11 23:44 
AnswerRe: how to built popup and attach to listcontrol Pin
Richard MacCutchan13-May-11 0:13
mveRichard MacCutchan13-May-11 0:13 
Questionhow to merge cells using msFlexgrid.. Pin
spalanivel12-May-11 19:25
spalanivel12-May-11 19:25 
AnswerRe: how to merge cells using msFlexgrid.. Pin
«_Superman_»12-May-11 20:18
professional«_Superman_»12-May-11 20:18 
GeneralRe: how to merge cells using msFlexgrid.. Pin
spalanivel12-May-11 20:41
spalanivel12-May-11 20:41 
Questionhow to simulate the mspaint... Pin
dousao12-May-11 17:08
dousao12-May-11 17:08 
AnswerRe: how to simulate the mspaint... Pin
KingsGambit12-May-11 18:38
KingsGambit12-May-11 18:38 
AnswerRe: how to simulate the mspaint... Pin
«_Superman_»12-May-11 20:20
professional«_Superman_»12-May-11 20:20 
AnswerRe: how to simulate the mspaint... Pin
Amarnath S12-May-11 22:34
professionalAmarnath S12-May-11 22:34 
QuestionCPropertySheet/CPropertyPage Pin
Bram van Kampen12-May-11 15:29
Bram van Kampen12-May-11 15:29 
QuestionRe: CPropertySheet/CPropertyPage Pin
JohnCz14-May-11 11:37
JohnCz14-May-11 11:37 
QuestionProblem with ActiveX: 0x80020005 (DISP_E_TYPEMISMATCH) Pin
XIpsYloNZ12-May-11 3:43
XIpsYloNZ12-May-11 3:43 
QuestionMS Flex Grid using VC++ Merge Cells not working... Pin
spalanivel12-May-11 3:10
spalanivel12-May-11 3: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.