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

C / C++ / MFC

 
GeneralRe: Finding a CWnd under the mouse ... Pin
Maximilien20-Nov-02 7:44
Maximilien20-Nov-02 7:44 
GeneralRe: Finding a CWnd under the mouse ... Pin
Fazlul Kabir20-Nov-02 7:54
Fazlul Kabir20-Nov-02 7:54 
GeneralPointer Question Pin
20-Nov-02 6:09
suss20-Nov-02 6:09 
GeneralRe: Pointer Question Pin
Christian Graus20-Nov-02 6:34
protectorChristian Graus20-Nov-02 6:34 
GeneralMDI MFC application: being able to run it windowless Pin
Le centriste20-Nov-02 5:59
Le centriste20-Nov-02 5:59 
GeneralRe: MDI MFC application: being able to run it windowless Pin
User 988520-Nov-02 6:56
User 988520-Nov-02 6:56 
GeneralRe: MDI MFC application: being able to run it windowless Pin
Le centriste20-Nov-02 7:14
Le centriste20-Nov-02 7:14 
GeneralRe: MDI MFC application: being able to run it windowless Pin
User 988520-Nov-02 7:48
User 988520-Nov-02 7:48 
You can move the command line checking even before the MDIDocTemplate is created and return without creating it, if you do not want the windows. When you run the line that creates the DocTemplate, that is when the MainFrame, Doc and Views are created and linked together.

<code>
        // This function will do your command line job, if you have a cmdline
	if (ProcessCommandLine())
        {
           m_pMainWnd = NULL;
           return TRUE;
        }	

        // if there is no command line, this will run
	CMultiDocTemplate* pDocTemplate;
	pDocTemplate = new CMultiDocTemplate(
		IDR_MDITYPE,
		RUNTIME_CLASS(CMdiDoc),
		RUNTIME_CLASS(CChildFrame), // custom MDI child frame
		RUNTIME_CLASS(CMdiView));
	AddDocTemplate(pDocTemplate);

	// create main MDI Frame window
	CMainFrame* pMainFrame = new CMainFrame;
	if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
		return FALSE;
	m_pMainWnd = pMainFrame;

	// The main window has been initialized, so show and update it.
	pMainFrame->ShowWindow(m_nCmdShow);
	pMainFrame->UpdateWindow();

	return TRUE;
</code>



My article on a reference-counted smart pointer that supports polymorphic objects and raw pointers


modified 29-Aug-18 21:01pm.

GeneralRe: MDI MFC application: being able to run it windowless Pin
User 988520-Nov-02 8:00
User 988520-Nov-02 8:00 
GeneralRe: MDI MFC application: being able to run it windowless Pin
Maximilien20-Nov-02 7:04
Maximilien20-Nov-02 7:04 
GeneralCStatusBar Document/View Pin
gandalf337320-Nov-02 5:49
gandalf337320-Nov-02 5:49 
GeneralRe: CStatusBar Document/View Pin
RobJones20-Nov-02 7:15
RobJones20-Nov-02 7:15 
GeneralDAO SDK Pin
dan o20-Nov-02 5:28
dan o20-Nov-02 5:28 
GeneralThe Large Access Database ! Pin
Hadi Rezaee20-Nov-02 5:23
Hadi Rezaee20-Nov-02 5:23 
GeneralRe: The Large Access Database ! Pin
dan o20-Nov-02 5:40
dan o20-Nov-02 5:40 
GeneralRe: The Large Access Database ! Pin
Hadi Rezaee20-Nov-02 6:21
Hadi Rezaee20-Nov-02 6:21 
GeneralRe: The Large Access Database ! Pin
Christian Graus20-Nov-02 6:52
protectorChristian Graus20-Nov-02 6:52 
GeneralRe: The Large Access Database ! Pin
Hadi Rezaee20-Nov-02 8:15
Hadi Rezaee20-Nov-02 8:15 
GeneralRe: The Large Access Database ! Pin
Christian Graus20-Nov-02 8:21
protectorChristian Graus20-Nov-02 8:21 
GeneralRe: The Large Access Database ! Pin
Hadi Rezaee20-Nov-02 10:15
Hadi Rezaee20-Nov-02 10:15 
GeneralClipboard Question Pin
Nitron20-Nov-02 5:05
Nitron20-Nov-02 5:05 
GeneralRe: Clipboard Question Pin
User 988520-Nov-02 5:17
User 988520-Nov-02 5:17 
GeneralRe: Clipboard Question Pin
Nitron20-Nov-02 8:00
Nitron20-Nov-02 8:00 
GeneralRe: Clipboard Question Pin
User 988520-Nov-02 8:10
User 988520-Nov-02 8:10 
GeneralRe: Clipboard Question Pin
Nitron20-Nov-02 8:13
Nitron20-Nov-02 8:13 

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.