Click here to Skip to main content
15,911,531 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: RegOpenKeyEx Question Pin
maneor10-May-06 12:40
maneor10-May-06 12:40 
GeneralRe: RegOpenKeyEx Question Pin
Nibu babu thomas10-May-06 17:25
Nibu babu thomas10-May-06 17:25 
AnswerRe: RegOpenKeyEx Question Pin
Frank K9-May-06 20:25
Frank K9-May-06 20:25 
QuestionCombo box control Pin
elephantstar9-May-06 12:21
elephantstar9-May-06 12:21 
QuestionLoading DLL inside the code Pin
Nacho Chip9-May-06 12:12
Nacho Chip9-May-06 12:12 
AnswerRe: Loading DLL inside the code Pin
Nibu babu thomas9-May-06 18:56
Nibu babu thomas9-May-06 18:56 
AnswerRe: Loading DLL inside the code Pin
Hamid_RT9-May-06 19:19
Hamid_RT9-May-06 19:19 
QuestionMDI Question Pin
BlitzPackage9-May-06 10:41
BlitzPackage9-May-06 10:41 
Colleagues,

I have a quick question.

I would think that the code pointed to by the arrow below would result in the IDR_MAINFRAME menu (and other resources) being displayed when the application starts. However, the IDR_PhotoOneTYPE menu and resources are loaded when the application starts. Is that because it just loads the first document template that is defined? If not, why is that?

Thanks in advance for any information you provide.

<br />
AfxEnableControlContainer();<br />
	// Standard initialization<br />
	// If you are not using these features and wish to reduce the size<br />
	// of your final executable, you should remove from the following<br />
	// the specific initialization routines you do not need<br />
	// Change the registry key under which our settings are stored<br />
	// TODO: You should modify this string to be something appropriate<br />
	// such as the name of your company or organization<br />
	SetRegistryKey(_T("Local AppWizard-Generated Applications"));<br />
	LoadStdProfileSettings(4);  // Load standard INI file options (including MRU)<br />
	// Register the application's document templates.  Document templates<br />
	//  serve as the connection between documents, frame windows and views<br />
	//CMultiDocTemplate* pDocTemplate;<br />
	pDocTemplate = new CMultiDocTemplate(IDR_PhotonOneTYPE,<br />
		RUNTIME_CLASS(CPhotonOneDoc),<br />
		RUNTIME_CLASS(CChildFrame), // custom MDI child frame<br />
		RUNTIME_CLASS(CPhotonOneView));<br />
	if (!pDocTemplate)<br />
		return FALSE;<br />
	AddDocTemplate(pDocTemplate);<br />
	// LyghtWayve Document Template<br />
	//CMultiDocTemplate* pLWDocTemplate;<br />
	pLWDocTemplate = new CMultiDocTemplate(IDR_MAINFRAME,<br />
		RUNTIME_CLASS(CLyghtWayveDoc),<br />
		RUNTIME_CLASS(CLyghtWayveFrm),<br />
		RUNTIME_CLASS(CLyghtWayveView));<br />
	if(!pLWDocTemplate)<br />
		return FALSE;<br />
	AddDocTemplate(pLWDocTemplate);<br />
<br />
	// create main MDI Frame window<br />
	CMainFrame* pMainFrame = new CMainFrame;<br />
	if (!pMainFrame || !pMainFrame->LoadFrame(IDR_MAINFRAME))               <----------<<<<<br />
		return FALSE;<br />
	m_pMainWnd = pMainFrame;<br />
	// call DragAcceptFiles only if there's a suffix<br />
	//  In an MDI app, this should occur immediately after setting m_pMainWnd<br />
	// Enable drag/drop open<br />
	m_pMainWnd->DragAcceptFiles();<br />
	// Enable DDE Execute open<br />
	EnableShellOpen();<br />
	RegisterShellFileTypes(TRUE);<br />
	// Parse command line for standard shell commands, DDE, file open<br />
	CCommandLineInfo cmdInfo;<br />
	ParseCommandLine(cmdInfo);<br />
	// Dispatch commands specified on the command line.  Will return FALSE if<br />
	// app was launched with /RegServer, /Register, /Unregserver or /Unregister.<br />
	if (!ProcessShellCommand(cmdInfo))<br />
		return FALSE;<br />
	// The main window has been initialized, so show and update it<br />
	pMainFrame->ShowWindow(m_nCmdShow);<br />
	pMainFrame->UpdateWindow();<br />
	return TRUE;<br />
<br />


-- modified at 16:41 Tuesday 9th May, 2006
AnswerRe: MDI Question Pin
Cool Ju9-May-06 21:01
Cool Ju9-May-06 21:01 
GeneralMDI Question Pin
BlitzPackage10-May-06 2:45
BlitzPackage10-May-06 2:45 
GeneralRe: MDI Question Pin
Cool Ju10-May-06 21:23
Cool Ju10-May-06 21:23 
GeneralRe: MDI Question Pin
BlitzPackage11-May-06 1:38
BlitzPackage11-May-06 1:38 
QuestionPlease help with data from DB into MFC app (edits) Pin
PatteTheHCCoder9-May-06 9:57
PatteTheHCCoder9-May-06 9:57 
QuestionHow to get Activex controls Version? Pin
CodeVarma9-May-06 8:18
CodeVarma9-May-06 8:18 
AnswerRe: How to get Activex controls Version? Pin
ramyasangeet11-May-06 19:19
ramyasangeet11-May-06 19:19 
QuestionHow to get Activex controls Version? Pin
CodeVarma9-May-06 8:18
CodeVarma9-May-06 8:18 
QuestionHow to tell whether explorer is hiding extensions for known file types ?. Pin
Atom9-May-06 8:06
Atom9-May-06 8:06 
AnswerRe: How to tell whether explorer is hiding extensions for known file types ?. Pin
David Crow9-May-06 8:19
David Crow9-May-06 8:19 
GeneralRe: How to tell whether explorer is hiding extensions for known file types ?. Pin
Atom9-May-06 11:09
Atom9-May-06 11:09 
GeneralRe: How to tell whether explorer is hiding extensions for known file types ?. Pin
David Crow10-May-06 3:13
David Crow10-May-06 3:13 
GeneralRe: How to tell whether explorer is hiding extensions for known file types ?. Pin
Atom10-May-06 6:33
Atom10-May-06 6:33 
QuestionProgramming Chip Cards Pin
branebb9-May-06 7:58
branebb9-May-06 7:58 
Questionget the coordinates of a pixel Pin
baile799-May-06 7:26
baile799-May-06 7:26 
AnswerRe: get the coordinates of a pixel Pin
David Crow9-May-06 7:42
David Crow9-May-06 7:42 
QuestionSOLVED! info in char variable changes to weird characters Pin
ilion blaze9-May-06 6:37
ilion blaze9-May-06 6: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.