Click here to Skip to main content
15,909,835 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: detect connection to internet without popping up dial-up Pin
David Crow24-Apr-03 5:37
David Crow24-Apr-03 5:37 
GeneralSet Directory to save to Pin
rbeat10024-Apr-03 4:14
rbeat10024-Apr-03 4:14 
GeneralRe: Set Directory to save to Pin
Rickard Andersson2024-Apr-03 4:27
Rickard Andersson2024-Apr-03 4:27 
GeneralRe: Set Directory to save to Pin
Maximilien24-Apr-03 4:31
Maximilien24-Apr-03 4:31 
GeneralRe: Set Directory to save to Pin
rbeat10024-Apr-03 4:40
rbeat10024-Apr-03 4:40 
GeneralRe: Set Directory to save to Pin
basementman24-Apr-03 6:39
basementman24-Apr-03 6:39 
GeneralRe: Set Directory to save to Pin
Rickard Andersson2024-Apr-03 11:46
Rickard Andersson2024-Apr-03 11:46 
GeneralCObject derived classes and Memory Leaks Pin
zakkum24-Apr-03 3:55
zakkum24-Apr-03 3:55 
Hi.

I have two classes derived from CObject. They are leaking memory somehow.
What's wrong?

Memory Leaks!
0 bytes in 0 Free Blocks.
273 bytes in 6 Normal Blocks.
0 bytes in 0 CRT Blocks.
0 bytes in 0 Ignore Blocks.
268 bytes in 3 Client Blocks.
Largest number used: 3260 bytes.
Total allocations: 4732 bytes.
EXPLORER.DLL Terminating!
DLG.DLL Terminating!
WEB.DLL Terminating!
The thread 0xEB4 has exited with code 0 (0x0).


<br />
// MainFrm.h ---------------------------------<br />
<br />
class CModulExplorer : public CObject<br />
{<br />
	DECLARE_SERIAL(CModulExplorer)<br />
public:<br />
	CModulExplorer();<br />
	virtual ~CModulExplorer();<br />
	virtual void Serialize(CArchive& ar);<br />
<br />
	HICON	hSIcon;<br />
	HICON	hLIcon;<br />
	BOOL	bSystemFolder;<br />
	CString	sDefaultName;<br />
	CString	sNodeName;<br />
	CString	sPath;<br />
};<br />
<br />
class CModulWeb : public CObject<br />
{	<br />
	DECLARE_SERIAL(CModulWeb)<br />
public:	<br />
	CModulWeb();<br />
	virtual ~CModulWeb();<br />
	virtual void Serialize(CArchive& ar);<br />
<br />
	enum NavigationStyle {WNS_BLANK = 1014, WNS_LAST = 1015, WNS_DEFAULT = 1016};<br />
<br />
	HICON	hSIcon;<br />
	HICON	hLIcon;<br />
	NavigationStyle	ns;<br />
	CString	sDefaultName;<br />
	CString	sUrl;<br />
	CString	sNodeName;<br />
};<br />
<br />
class CMainFrame : public CMDIFrameWnd<br />
{<br />
	DECLARE_DYNAMIC(CMainFrame)<br />
public:<br />
	CMainFrame();<br />
<br />
// Attributes<br />
public:<br />
	CModulExplorer *m_pExplorerCls;<br />
	CModulWeb *m_pWebCls;<br />
...<br />
}<br />
<br />
<br />
// MainFrm.cpp --------------------------------<br />
<br />
IMPLEMENT_SERIAL(CModulExplorer, CObject, 0)<br />
IMPLEMENT_SERIAL(CModulWeb, CObject, 0)<br />
<br />
/////////////////////////////////////////////////////////////////////////////<br />
// CModulExplorer construction/destruction/serialize<br />
<br />
CModulExplorer::CModulExplorer()<br />
{<br />
}<br />
<br />
CModulExplorer::~CModulExplorer()<br />
{<br />
}<br />
<br />
void CModulExplorer::Serialize(CArchive& ar)<br />
{<br />
}<br />
<br />
/////////////////////////////////////////////////////////////////////////////<br />
// CModulWeb construction/destruction/serialize<br />
<br />
CModulWeb::CModulWeb()<br />
{<br />
}<br />
<br />
CModulWeb::~CModulWeb()<br />
{<br />
}<br />
<br />
void CModulWeb::Serialize(CArchive& ar)<br />
{<br />
}<br />
<br />
/////////////////////////////////////////////////////////////////////////////<br />
// CMainFrame construction/destruction/serialize<br />
<br />
CMainFrame::CMainFrame()<br />
{<br />
	CRuntimeClass* pClass = NULL;<br />
<br />
	pClass = RUNTIME_CLASS(CModulExplorer);<br />
	m_pExplorerCls = (CModulExplorer*)pClass->CreateObject();<br />
<br />
	pClass = RUNTIME_CLASS(CModulWeb);<br />
	m_pWebCls = (CModulWeb*)pClass->CreateObject();	<br />
}<br />
<br />
CMainFrame::~CMainFrame()<br />
{<br />
	delete m_pExplorerCls;<br />
	delete m_pWebCls;<br />
}<br />

GeneralADO and big tables Pin
ilgale24-Apr-03 3:54
ilgale24-Apr-03 3:54 
GeneralRe: ADO and big tables Pin
Rickard Andersson2024-Apr-03 4:24
Rickard Andersson2024-Apr-03 4:24 
GeneralRe: ADO and big tables Pin
ilgale24-Apr-03 4:35
ilgale24-Apr-03 4:35 
GeneralRe: ADO and big tables Pin
Rickard Andersson2024-Apr-03 5:33
Rickard Andersson2024-Apr-03 5:33 
GeneralRe: ADO and big tables Pin
Toni7825-Apr-03 8:01
Toni7825-Apr-03 8:01 
QuestionHow to draw a transparent icon on top of another Pin
Salvador Dali24-Apr-03 3:50
Salvador Dali24-Apr-03 3:50 
AnswerRe: How to draw a transparent icon on top of another Pin
basementman24-Apr-03 6:43
basementman24-Apr-03 6:43 
GeneralWorking Set Tuner Pin
Anonymous24-Apr-03 3:11
Anonymous24-Apr-03 3:11 
GeneralCreate a Window without lose my focus Pin
Ricky_TheBard24-Apr-03 3:10
Ricky_TheBard24-Apr-03 3:10 
GeneralRe: Create a Window without lose my focus Pin
valikac24-Apr-03 6:54
valikac24-Apr-03 6:54 
QuestionHow to embed one dialog resource to another? Pin
kydfru24-Apr-03 3:03
kydfru24-Apr-03 3:03 
AnswerRE: only a suggestion... Pin
Joan M24-Apr-03 3:18
professionalJoan M24-Apr-03 3:18 
GeneralYes! That's exactly what I want! Thanks! Pin
kydfru24-Apr-03 3:42
kydfru24-Apr-03 3:42 
GeneralWSNMP32.DLL Pin
David Cunningham24-Apr-03 2:56
cofounderDavid Cunningham24-Apr-03 2:56 
GeneralRe: WSNMP32.DLL Pin
obmit24-Apr-03 5:01
obmit24-Apr-03 5:01 
GeneralUNZDLL.DLL Pin
Dave_24-Apr-03 2:47
Dave_24-Apr-03 2:47 
GeneralRe: UNZDLL.DLL Pin
Brian Delahunty24-Apr-03 3:37
Brian Delahunty24-Apr-03 3:37 

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.