Click here to Skip to main content
15,884,388 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Difference between _stat() and _fstat() Pin
Andrew Brock17-Jan-11 19:53
Andrew Brock17-Jan-11 19:53 
QuestionCTypedPtrArray & CStringArray Pin
mesajflaviu17-Jan-11 9:10
mesajflaviu17-Jan-11 9:10 
AnswerRe: CTypedPtrArray & CStringArray Pin
Chris Meech17-Jan-11 10:01
Chris Meech17-Jan-11 10:01 
GeneralRe: CTypedPtrArray & CStringArray Pin
mesajflaviu17-Jan-11 19:06
mesajflaviu17-Jan-11 19:06 
AnswerRe: CTypedPtrArray & CStringArray Pin
Andrew Brock17-Jan-11 16:04
Andrew Brock17-Jan-11 16:04 
GeneralRe: CTypedPtrArray & CStringArray Pin
mesajflaviu17-Jan-11 19:38
mesajflaviu17-Jan-11 19:38 
GeneralRe: CTypedPtrArray & CStringArray Pin
Andrew Brock17-Jan-11 19:51
Andrew Brock17-Jan-11 19:51 
AnswerRe: CTypedPtrArray & CStringArray Pin
mesajflaviu17-Jan-11 22:11
mesajflaviu17-Jan-11 22:11 
I don't know if is corect , but I think that I solve it :
//    CMyDoc.h
typedef CTypedPtrArray<CObArray,CStringArray*> CDumpArray;
class CMyDoc : public CDocument
{
protected: // create from serialization only
	CMyDoc();
	DECLARE_DYNCREATE(CMyDoc)

// Attributes
public:
	CDumpArray m_arrDump;
...
};

//    CMyDoc.cpp
	CString sText = "one";
	CStringArray* pTable = NULL;
	pTable = new CStringArray();
	pTable->Add(sText);
	sText = "two";
	pTable->Add(sText);

	m_arrDump.Add(pTable);

	pTable = new CStringArray();
	sText = "three";
	pTable->Add(sText);
	sText = "four";
	pTable->Add(sText);

	m_arrDump.Add(pTable);


void CMyDoc::OnCloseDocument() 
{
	// TODO: Add your specialized code here and/or call the base class

	TRACE("\n m_arrDump %d \n",m_arrDump.GetSize());

	CString sTemp;
	for(int n = 0;n < m_arrDump.GetSize();++n)
	{
		TRACE("\n StringArray no %d \n",n);
		CStringArray* pTable = m_arrDump.GetAt(n);
		for(int t = 0;t < pTable->GetSize();++t)
		{
			sTemp = pTable->GetAt(t);
			TRACE("\n %s \n",sTemp);
		}
	}
	int nCount = m_arrDump.GetSize();
	for(int i = 0;i < nCount;++i)delete m_arrDump.GetAt(i);
	m_arrDump.RemoveAll();

	TRACE("\n m_arrDump %d \n",m_arrDump.GetSize());

	CDocument::OnCloseDocument();
}

GeneralRe: CTypedPtrArray & CStringArray Pin
Andrew Brock17-Jan-11 22:36
Andrew Brock17-Jan-11 22:36 
GeneralRe: CTypedPtrArray & CStringArray Pin
mesajflaviu18-Jan-11 1:47
mesajflaviu18-Jan-11 1:47 
QuestionDisplay dialog after SDI app opens Pin
David Crow17-Jan-11 3:01
David Crow17-Jan-11 3:01 
AnswerRe: Display dialog after SDI app opens Pin
Maximilien17-Jan-11 3:30
Maximilien17-Jan-11 3:30 
GeneralRe: Display dialog after SDI app opens Pin
David Crow17-Jan-11 3:39
David Crow17-Jan-11 3:39 
AnswerRe: Display dialog after SDI app opens Pin
Andrew Brock17-Jan-11 3:54
Andrew Brock17-Jan-11 3:54 
AnswerRe: Display dialog after SDI app opens Pin
David Crow17-Jan-11 8:36
David Crow17-Jan-11 8:36 
AnswerRe: Display dialog after SDI app opens Pin
Alain Rist17-Jan-11 5:48
Alain Rist17-Jan-11 5:48 
AnswerRe: Display dialog after SDI app opens Pin
PJ Arends17-Jan-11 7:51
professionalPJ Arends17-Jan-11 7:51 
QuestionImplementation of Chord DHT in ANSI C. Pin
przemnet17-Jan-11 1:42
przemnet17-Jan-11 1:42 
GeneralRe: Implementation of Chord DHT in ANSI C. Pin
CPallini17-Jan-11 2:01
mveCPallini17-Jan-11 2:01 
QuestionQuestion for Static control with Notify property. Pin
Le@rner16-Jan-11 22:43
Le@rner16-Jan-11 22:43 
AnswerRe: Question for Static control with Notify property. Pin
Niklas L16-Jan-11 22:50
Niklas L16-Jan-11 22:50 
GeneralRe: Question for Static control with Notify property. Pin
Le@rner16-Jan-11 23:10
Le@rner16-Jan-11 23:10 
GeneralRe: Question for Static control with Notify property. Pin
Andrew Brock16-Jan-11 23:23
Andrew Brock16-Jan-11 23:23 
GeneralRe: Question for Static control with Notify property. Pin
Le@rner16-Jan-11 23:30
Le@rner16-Jan-11 23:30 
GeneralRe: Question for Static control with Notify property. Pin
Andrew Brock16-Jan-11 23:34
Andrew Brock16-Jan-11 23:34 

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.