Click here to Skip to main content
16,007,809 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OnKeyDown() ignored? Pin
aquawicket18-Apr-07 6:00
aquawicket18-Apr-07 6:00 
QuestionIs there any way to convert MFC application to C# app? Pin
oleg6313-Apr-07 12:12
professionaloleg6313-Apr-07 12:12 
AnswerRe: Is there any way to convert MFC application to C# app? Pin
Mark Salsbery13-Apr-07 12:39
Mark Salsbery13-Apr-07 12:39 
QuestionFirst Chance exception Pin
namratab13-Apr-07 11:10
namratab13-Apr-07 11:10 
AnswerRe: First Chance exception Pin
bob1697214-Apr-07 7:55
bob1697214-Apr-07 7:55 
QuestionDestructor Not Getting Called Pin
CoffeeAddict1913-Apr-07 11:09
CoffeeAddict1913-Apr-07 11:09 
QuestionRe: Destructor Not Getting Called Pin
Mark Salsbery13-Apr-07 11:23
Mark Salsbery13-Apr-07 11:23 
AnswerRe: Destructor Not Getting Called Pin
CoffeeAddict1913-Apr-07 11:32
CoffeeAddict1913-Apr-07 11:32 
I only have one CCharLinkedList object. It is allocated on the free store (not new/delete), here:

class CRatiosWin : public CFrameWnd
{
public:
	CRatiosWin(); //default constructor
	~CRatiosWin(); //destructor
	CRatiosLogic RatiosLogic;
	bool GetNewFilePath(CString & Path);
	void PrintResults(string results);
	//accessor functions
	bool ReturnValidFilePathSet();
	//manipulator functions
	void ResetSearchDialogFlag(); //set that the search dialog has not been opened
	void SetDatabaseFilePathStatus(bool FilePathWasSet);
	void SetTimeParameterStatus(bool NewTimeParametersWereSet);
protected:
private:
	//classes
	CRatiosNewSearchDialog NewSearchDialog;
	CRatiosSearchTimeParameters TimeParametersDialog;
	CCharLinkedList TestLinkedList; :(
	//other private members
	CEdit ResultsBox;
	BOOL NewSearchDialogIsVisible; //if TRUE, the NewSearchDialog is active
	bool ValidFilePathSet;
	bool TimeParametersWereSet;
	afx_msg void OnClose();
	afx_msg void OnOpenFile();
	afx_msg void OnNewSearch();
	afx_msg void OnOpenSearch();
	afx_msg void OnAbout();
	afx_msg void OnTestList();
DECLARE_MESSAGE_MAP()
};

I loaded some text into the list by calling this at runtime:
afx_msg void CRatiosWin::OnTestList()
{
	fstream ListFileStream;
	char chLine[MAXNUMCHARS_LINKLISTNODE];
	string strLine = "";

	ListFileStream.open("list_test.txt");
	while(ListFileStream.eof() == false)
	{
		getline(ListFileStream, strLine);
		ASSERT(strLine.length() < MAXNUMCHARS_LINKLISTNODE);
		strcpy(chLine, strLine.c_str());
		TestLinkedList.AddNodeToTail(chLine);
	}
	MessageBox("Sent to file.", "Boink", MB_OK);
	ListFileStream.close();
}

All of the above worked fine. But I set breakpoints in the destructor in the previous post and none of them were reached, plus I have a big memory leak.
GeneralRe: Destructor Not Getting Called Pin
Mark Salsbery13-Apr-07 11:36
Mark Salsbery13-Apr-07 11:36 
GeneralRe: Destructor Not Getting Called Pin
CoffeeAddict1913-Apr-07 11:48
CoffeeAddict1913-Apr-07 11:48 
GeneralRe: Destructor Not Getting Called Pin
Mark Salsbery13-Apr-07 12:10
Mark Salsbery13-Apr-07 12:10 
GeneralRe: Destructor Not Getting Called Pin
Mark Salsbery13-Apr-07 12:33
Mark Salsbery13-Apr-07 12:33 
AnswerRe: Destructor Not Getting Called Pin
John R. Shaw14-Apr-07 15:57
John R. Shaw14-Apr-07 15:57 
QuestionLogOff User from a Service running as System Pin
Gurkenscheibe13-Apr-07 10:44
Gurkenscheibe13-Apr-07 10:44 
Questionwhich one is parent? Pin
iayd13-Apr-07 9:02
iayd13-Apr-07 9:02 
AnswerRe: which one is parent? Pin
Wes Aday13-Apr-07 9:54
professionalWes Aday13-Apr-07 9:54 
QuestionRe: which one is parent? Pin
Maximilien13-Apr-07 9:56
Maximilien13-Apr-07 9:56 
AnswerRe: which one is parent? Pin
CPallini13-Apr-07 10:10
mveCPallini13-Apr-07 10:10 
AnswerRe: which one is parent? Pin
CPallini13-Apr-07 10:06
mveCPallini13-Apr-07 10:06 
AnswerRe: which one is parent? Pin
bob1697213-Apr-07 10:10
bob1697213-Apr-07 10:10 
AnswerRe: which one is parent? Pin
JudyL_MD13-Apr-07 10:14
JudyL_MD13-Apr-07 10:14 
GeneralRe: which one is parent? Pin
iayd13-Apr-07 11:15
iayd13-Apr-07 11:15 
Questionhard disk serial number in vista Pin
viral_umang@hotmail.com13-Apr-07 8:59
viral_umang@hotmail.com13-Apr-07 8:59 
AnswerRe: hard disk serial number in vista Pin
bob1697213-Apr-07 9:58
bob1697213-Apr-07 9:58 
QuestionRe: hard disk serial number in vista Pin
viral_umang@hotmail.com13-Apr-07 10:16
viral_umang@hotmail.com13-Apr-07 10:16 

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.