Click here to Skip to main content
15,906,626 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multiple application.exe Pin
Owner drawn24-Nov-05 0:15
Owner drawn24-Nov-05 0:15 
GeneralRe: Multiple application.exe Pin
Boder Coder24-Nov-05 0:39
Boder Coder24-Nov-05 0:39 
GeneralRe: Multiple application.exe Pin
Rage24-Nov-05 1:22
professionalRage24-Nov-05 1:22 
GeneralRe: Multiple application.exe Pin
Jagadeesh VN24-Nov-05 1:24
Jagadeesh VN24-Nov-05 1:24 
GeneralRe: Multiple application.exe Pin
Boder Coder24-Nov-05 2:24
Boder Coder24-Nov-05 2:24 
GeneralRe: Multiple application.exe Pin
toxcct24-Nov-05 2:42
toxcct24-Nov-05 2:42 
GeneralRe: Multiple application.exe Pin
Boder Coder24-Nov-05 2:55
Boder Coder24-Nov-05 2:55 
GeneralRe: Multiple application.exe Pin
Boder Coder24-Nov-05 2:58
Boder Coder24-Nov-05 2:58 
I am giving full method that I written
<br />
/////////////////////////////////////////////////////////////////////////////<br />
// CEtmenApp initialization<br />
<br />
BOOL CEtmenApp::InitInstance()<br />
{<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 />
<br />
	if (!AfxSocketInit())<br />
	{<br />
		AfxMessageBox(IDP_SOCKETS_INIT_FAILED);<br />
		return FALSE;<br />
	}<br />
<br />
#ifdef _AFXDLL<br />
	Enable3dControls();			// Call this when using MFC in a shared DLL<br />
#else<br />
	Enable3dControlsStatic();	// Call this when linking to MFC statically<br />
#endif<br />
<br />
<br />
<br />
    if (instanceChecker.PreviousInstanceRunning())<br />
    {<br />
      AfxMessageBox(_T("Previous version detected, will now restore it"), <br />
                                                                   MB_OK);<br />
      instanceChecker.ActivatePreviousInstance();<br />
      return FALSE;<br />
    }<br />
<br />
<br />
<br />
	CEtmenDlg dlg;<br />
	m_pMainWnd = &dlg;<br />
<br />
	// If this is the first instance of our App then<br />
    // track it so any other instances can find it.<br />
	<br />
	if (!instanceChecker.PreviousInstanceRunning())<br />
        instanceChecker.TrackFirstInstanceRunning();<br />
<br />
	<br />
<br />
	CString cmdLine = m_lpCmdLine;<br />
	CString token = GetNextCmdLineToken(cmdLine);<br />
	while (!token.IsEmpty())<br />
	{<br />
		if (token == '-')<br />
		{<br />
			token = GetNextCmdLineToken(cmdLine);<br />
			if (!token.CompareNoCase("arazi"))<br />
			{<br />
				dlg.m_araziDizini = GetNextCmdLineToken(cmdLine);<br />
			} else if (!token.CompareNoCase("coklu_calisma"))<br />
			{<br />
				dlg.m_bCokluCalisma = true;<br />
			} else if (!token.CompareNoCase("kostur"))<br />
			{<br />
				dlg.m_bKostur = true;<br />
			} else if (!token.CompareNoCase("cc_sunucusu"))<br />
			{<br />
				m_strCCServer = GetNextCmdLineToken(cmdLine);<br />
			}<br />
		} else dlg.m_senaryoDosyasi = token;<br />
		token = GetNextCmdLineToken(cmdLine);<br />
	}<br />
<br />
<br />
	int nResponse = dlg.DoModal();<br />
	if (nResponse == IDOK)<br />
	{<br />
		// TODO: Place code here to handle when the dialog is<br />
		//  dismissed with OK<br />
	}<br />
	else if (nResponse == IDCANCEL)<br />
	{<br />
		// TODO: Place code here to handle when the dialog is<br />
		//  dismissed with Cancel<br />
	}<br />
<br />
	// Since the dialog has been closed, return FALSE so that we exit the<br />
	//  application, rather than start the application's message pump.<br />
	return FALSE;<br />
}<br />
<br />
<br />

GeneralRe: Multiple application.exe Pin
Blake Miller28-Nov-05 12:58
Blake Miller28-Nov-05 12:58 
QuestionParallel Programming Pin
Gordon Robert Speirs23-Nov-05 23:09
professionalGordon Robert Speirs23-Nov-05 23:09 
Questionproject encryption Pin
pankaj_cout23-Nov-05 23:00
pankaj_cout23-Nov-05 23:00 
AnswerRe: project encryption Pin
toxcct23-Nov-05 23:06
toxcct23-Nov-05 23:06 
QuestionDestruction in C++ Pin
ita_cas23-Nov-05 22:28
ita_cas23-Nov-05 22:28 
AnswerRe: Destruction in C++ Pin
toxcct23-Nov-05 22:32
toxcct23-Nov-05 22:32 
AnswerRe: Destruction in C++ Pin
khan++23-Nov-05 22:35
khan++23-Nov-05 22:35 
AnswerRe: Destruction in C++ Pin
Owner drawn24-Nov-05 0:04
Owner drawn24-Nov-05 0:04 
AnswerRe: Destruction in C++ Pin
Gary R. Wheeler25-Nov-05 3:50
Gary R. Wheeler25-Nov-05 3:50 
QuestionHow do I close another program from my program Pin
shortwave23-Nov-05 22:15
shortwave23-Nov-05 22:15 
AnswerRe: How do I close another program from my program Pin
toxcct23-Nov-05 22:20
toxcct23-Nov-05 22:20 
GeneralRe: How do I close another program from my program Pin
ThatsAlok23-Nov-05 22:40
ThatsAlok23-Nov-05 22:40 
AnswerRe: How do I close another program from my program Pin
Cool Ju23-Nov-05 22:40
Cool Ju23-Nov-05 22:40 
AnswerRe: How do I close another program from my program Pin
sanket.patel25-Nov-05 23:04
sanket.patel25-Nov-05 23:04 
Questionunsigned 64 bits ? Pin
Cedric Moonen23-Nov-05 22:05
Cedric Moonen23-Nov-05 22:05 
AnswerRe: unsigned 64 bits ? Pin
toxcct23-Nov-05 22:12
toxcct23-Nov-05 22:12 
GeneralRe: unsigned 64 bits ? Pin
Cedric Moonen23-Nov-05 22:25
Cedric Moonen23-Nov-05 22:25 

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.