Click here to Skip to main content
15,895,827 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: problems with arrays Pin
Richard MacCutchan2-Nov-10 22:32
mveRichard MacCutchan2-Nov-10 22:32 
GeneralRe: problems with arrays Pin
rezen852-Nov-10 23:39
rezen852-Nov-10 23:39 
GeneralRe: problems with arrays Pin
Richard MacCutchan3-Nov-10 4:45
mveRichard MacCutchan3-Nov-10 4:45 
AnswerRe: problems with arrays Pin
ShilpiP2-Nov-10 22:45
ShilpiP2-Nov-10 22:45 
GeneralRe: problems with arrays Pin
rezen852-Nov-10 23:45
rezen852-Nov-10 23:45 
QuestionMDI with CDocument invalid pointer Pin
Pascal Pinchauret-Lamothe2-Nov-10 6:19
Pascal Pinchauret-Lamothe2-Nov-10 6:19 
AnswerRe: MDI with CDocument invalid pointer Pin
Richard MacCutchan2-Nov-10 12:17
mveRichard MacCutchan2-Nov-10 12:17 
GeneralRe: MDI with CDocument invalid pointer Pin
Pascal Pinchauret-Lamothe25-Nov-10 4:22
Pascal Pinchauret-Lamothe25-Nov-10 4:22 
Hi,

I think I have finally found the reason and the solution to my problem.

1) My test application works perfectly; actually, the debug logs are not written entirely because my test application run too fast.

2) Concerning the CDocument invalid pointer assertion, the reason was that in my application (not the test one but the real one) my document class derived from 3 classes as follows:

(.h)
class CMyDoc : public CMyData, public CDocument
{
DECLARE_DYNCREATE(CMyDoc);
...
};

(.cpp)
IMPLEMENT_DYNCREATE(CMyDoc, CDocument)


And MSDN Technical Note 016 (Using C++ Multiple Inheritance with MFC) says that "The base class you specify in IMPLEMENT_DYNAMIC or IMPLEMENT_SERIAL should be the first (or left-most) base class.".
And in my application, CDocument was not the first!
I have put CDocument in first position and now it seems to work all the time without assertion, see fixed code below:
class CMyDoc : public CDocument, public CMyData


For more information, see MSDN TN016.

Bye
Thanks and regards
Pascal

QuestionMulti-line List Control Pin
softwaremonkey2-Nov-10 5:06
softwaremonkey2-Nov-10 5:06 
AnswerRe: Multi-line List Control Pin
federico.strati2-Nov-10 5:39
federico.strati2-Nov-10 5:39 
AnswerRe: Multi-line List Control Pin
«_Superman_»2-Nov-10 7:06
professional«_Superman_»2-Nov-10 7:06 
QuestionXML parsing Pin
Benjamin Bruno2-Nov-10 3:19
Benjamin Bruno2-Nov-10 3:19 
AnswerRe: XML parsing Pin
CPallini2-Nov-10 3:25
mveCPallini2-Nov-10 3:25 
AnswerRe: XML parsing Pin
ShilpiP2-Nov-10 19:36
ShilpiP2-Nov-10 19:36 
QuestionAFX_EXT_CLASS Problem. Pin
002comp1-Nov-10 23:30
002comp1-Nov-10 23:30 
AnswerRe: AFX_EXT_CLASS Problem. Pin
Niklas L1-Nov-10 23:35
Niklas L1-Nov-10 23:35 
QuestionHelp me DisConnect Internet use Ras Pin
so0_lanhlung21-Nov-10 8:10
so0_lanhlung21-Nov-10 8:10 
AnswerRe: Help me DisConnect Internet use Ras Pin
«_Superman_»1-Nov-10 8:15
professional«_Superman_»1-Nov-10 8:15 
GeneralRe: Help me DisConnect Internet use Ras Pin
so0_lanhlung21-Nov-10 8:28
so0_lanhlung21-Nov-10 8:28 
GeneralRe: Help me DisConnect Internet use Ras Pin
«_Superman_»1-Nov-10 8:41
professional«_Superman_»1-Nov-10 8:41 
AnswerRe: Help me DisConnect Internet use Ras Pin
David Crow1-Nov-10 9:11
David Crow1-Nov-10 9:11 
AnswerRe: Help me DisConnect Internet use Ras Pin
Alain Rist1-Nov-10 10:15
Alain Rist1-Nov-10 10:15 
QuestionC2504 error using CMFCButton (or other CMFCFxxx classes) within a DLL Pin
Ralph1-Nov-10 6:51
Ralph1-Nov-10 6:51 
QuestionRe: C2504 error using CMFCButton (or other CMFCFxxx classes) within a DLL Pin
Christoph Bail1-Nov-10 9:14
Christoph Bail1-Nov-10 9:14 
AnswerRe: C2504 error using CMFCButton (or other CMFCFxxx classes) within a DLL Pin
Ralph1-Nov-10 20:29
Ralph1-Nov-10 20:29 

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.