Click here to Skip to main content
15,902,492 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: A Very Simple MFC Application Pin
David Crow16-Oct-08 10:45
David Crow16-Oct-08 10:45 
AnswerRe: A Very Simple MFC Application Pin
BobInNJ16-Oct-08 10:48
BobInNJ16-Oct-08 10:48 
GeneralRe: A Very Simple MFC Application Pin
David Crow16-Oct-08 10:52
David Crow16-Oct-08 10:52 
GeneralRe: A Very Simple MFC Application Pin
BobInNJ16-Oct-08 11:20
BobInNJ16-Oct-08 11:20 
GeneralRe: A Very Simple MFC Application Pin
Mark Salsbery16-Oct-08 10:47
Mark Salsbery16-Oct-08 10:47 
AnswerRe: A Very Simple MFC Application Pin
BobInNJ16-Oct-08 12:41
BobInNJ16-Oct-08 12:41 
GeneralRe: A Very Simple MFC Application Pin
User 21559716-Oct-08 18:17
User 21559716-Oct-08 18:17 
GeneralRe: A Very Simple MFC Application Pin
BobInNJ17-Oct-08 2:32
BobInNJ17-Oct-08 2:32 
It now dies inside the following MFC routine:

<br />
void CSingleDocTemplate::SetDefaultTitle(CDocument* pDocument)<br />
{<br />
	CString strDocName;<br />
	if (!GetDocString(strDocName, CDocTemplate::docName) ||<br />
		strDocName.IsEmpty())<br />
	{<br />
		// use generic 'untitled'<br />
		ENSURE(strDocName.LoadString(AFX_IDS_UNTITLED));<br />
	}<br />
	pDocument->SetTitle(strDocName);<br />
}<br />


In particular, with the call to ENSURE. Here is the call stack when it dies:

>	sdi1.exe!CSingleDocTemplate::SetDefaultTitle(CDocument * pDocument=0x003d95e8)  Line 207	C++
 	sdi1.exe!CSingleDocTemplate::OpenDocumentFile(const wchar_t * lpszPathName=0x00000000, int bMakeVisible=1)  Line 141	C++
 	sdi1.exe!CDocManager::OnFileNew()  Line 848	C++
 	sdi1.exe!CWinApp::OnFileNew()  Line 22	C++
 	sdi1.exe!CWinApp::ProcessShellCommand(CCommandLineInfo & rCmdInfo={...})  Line 26	C++
 	sdi1.exe!MainApp::InitInstance()  Line 50 + 0xc bytes	C++
 	sdi1.exe!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, wchar_t * lpCmdLine=0x00020908, int nCmdShow=1)  Line 37 + 0xd bytes	C++
 	sdi1.exe!wWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, wchar_t * lpCmdLine=0x00020908, int nCmdShow=1)  Line 30	C++
 	sdi1.exe!__tmainCRTStartup()  Line 263 + 0x2c bytes	C
 	sdi1.exe!wWinMainCRTStartup()  Line 182	C
 	kernel32.dll!7c817067() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]	


I am hoping somebody here can tell me what I am doing wrong. I am finding programs using the SDI model to be very hard to write and debug.

Thanks
Bob
GeneralRe: A Very Simple MFC Application Pin
Mark Salsbery17-Oct-08 4:48
Mark Salsbery17-Oct-08 4:48 
GeneralRe: A Very Simple MFC Application Pin
User 21559717-Oct-08 7:15
User 21559717-Oct-08 7:15 
QuestionRefresh a dockable pane Pin
Laan8216-Oct-08 6:22
Laan8216-Oct-08 6:22 
NewsLoading a DLL from memory Pin
Hamid_RT16-Oct-08 4:33
Hamid_RT16-Oct-08 4:33 
QuestionRe: Loading a DLL from memory Pin
CPallini16-Oct-08 5:38
mveCPallini16-Oct-08 5:38 
AnswerRe: Loading a DLL from memory Pin
Hamid_RT16-Oct-08 6:21
Hamid_RT16-Oct-08 6:21 
GeneralRe: Loading a DLL from memory Pin
Perspx16-Oct-08 5:56
Perspx16-Oct-08 5:56 
GeneralRe: Loading a DLL from memory Pin
Hamid_RT16-Oct-08 6:21
Hamid_RT16-Oct-08 6:21 
GeneralRe: Loading a DLL from memory Pin
Naveen16-Oct-08 15:35
Naveen16-Oct-08 15:35 
GeneralRe: Loading a DLL from memory Pin
enhzflep16-Oct-08 16:46
enhzflep16-Oct-08 16:46 
QuestionDLL load issue Pin
George_George16-Oct-08 3:22
George_George16-Oct-08 3:22 
AnswerRe: DLL load issue Pin
Hamid_RT16-Oct-08 4:19
Hamid_RT16-Oct-08 4:19 
GeneralRe: DLL load issue Pin
George_George17-Oct-08 3:20
George_George17-Oct-08 3:20 
QuestionRe: DLL load issue Pin
led mike16-Oct-08 4:26
led mike16-Oct-08 4:26 
AnswerRe: DLL load issue Pin
Hamid_RT16-Oct-08 4:30
Hamid_RT16-Oct-08 4:30 
AnswerRe: DLL load issue Pin
cmk16-Oct-08 6:52
cmk16-Oct-08 6:52 
GeneralRe: DLL load issue Pin
led mike16-Oct-08 7:19
led mike16-Oct-08 7:19 

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.