Click here to Skip to main content
15,921,279 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Passing and receving value through ShellExecute Pin
neha.agarwal2718-Nov-07 23:26
neha.agarwal2718-Nov-07 23:26 
GeneralRe: Passing and receving value through ShellExecute Pin
Rajesh R Subramanian18-Nov-07 23:31
professionalRajesh R Subramanian18-Nov-07 23:31 
GeneralRe: Passing and receving value through ShellExecute Pin
neha.agarwal2718-Nov-07 23:51
neha.agarwal2718-Nov-07 23:51 
GeneralRe: Passing and receving value through ShellExecute Pin
Rajesh R Subramanian18-Nov-07 23:57
professionalRajesh R Subramanian18-Nov-07 23:57 
GeneralRe: Passing and receving value through ShellExecute Pin
neha.agarwal2719-Nov-07 0:03
neha.agarwal2719-Nov-07 0:03 
AnswerRe: Passing and receving value through ShellExecute Pin
neha.agarwal2719-Nov-07 0:10
neha.agarwal2719-Nov-07 0:10 
GeneralRe: Passing and receving value through ShellExecute Pin
Rajesh R Subramanian19-Nov-07 0:27
professionalRajesh R Subramanian19-Nov-07 0:27 
GeneralRe: Passing and receving value through ShellExecute Pin
Rajesh R Subramanian19-Nov-07 0:11
professionalRajesh R Subramanian19-Nov-07 0:11 
Calling Executable:
void CShellexeDlg::OnButton1() 
{
	CString index_File = "C:\\Documents and Settings\\Mayank\\My Documents\\ppnam\\Debug\\ppnam.exe";
	CString pass_val = "neha";
	ShellExecute(NULL,"open",index_File,pass_val,NULL,SW_SHOW);
	CDialog::OnOK();//Call OnOk() at the end!!
}


Called Executable:
BOOL CPpnamApp::InitInstance()
{
AfxEnableControlContainer();

#ifdef _AFXDLL
	Enable3dControls();			// Call this when using MFC in a shared DLL
#else
	Enable3dControlsStatic();	// Call this when linking to MFC statically
#endif
	AfxMessageBox(m_lpCmdLine);//Call it here!!

        CPpnamDlg dlg;
	m_pMainWnd = &dlg;
        //...other code
}


Also, remove calls to GetCommandLine() from your OnInitDialog() and else where.



QuestionLearning Socket Programming Pin
ksrameshkanth18-Nov-07 17:32
ksrameshkanth18-Nov-07 17:32 
AnswerRe: Learning Socket Programming Pin
manish.patel18-Nov-07 17:57
manish.patel18-Nov-07 17:57 
AnswerRe: Learning Socket Programming Pin
Arun krishnan18-Nov-07 21:20
Arun krishnan18-Nov-07 21:20 
AnswerRe: Learning Socket Programming Pin
Hamid_RT18-Nov-07 21:55
Hamid_RT18-Nov-07 21:55 
QuestionMFC DLL Pin
Sanjay8899918-Nov-07 17:21
Sanjay8899918-Nov-07 17:21 
AnswerRe: MFC DLL Pin
Paresh Chitte18-Nov-07 17:54
Paresh Chitte18-Nov-07 17:54 
QuestionSocket Error Pin
manish.patel18-Nov-07 16:15
manish.patel18-Nov-07 16:15 
AnswerRe: Socket Error Pin
Mark Salsbery18-Nov-07 16:21
Mark Salsbery18-Nov-07 16:21 
GeneralRe: Socket Error Pin
manish.patel18-Nov-07 16:32
manish.patel18-Nov-07 16:32 
AnswerRe: Socket Error Pin
Peter Weyzen18-Nov-07 19:29
Peter Weyzen18-Nov-07 19:29 
Questionvalue_type of vector Pin
George_George18-Nov-07 16:07
George_George18-Nov-07 16:07 
AnswerRe: value_type of vector Pin
Stephen Hewitt18-Nov-07 18:00
Stephen Hewitt18-Nov-07 18:00 
GeneralRe: value_type of vector Pin
George_George18-Nov-07 19:46
George_George18-Nov-07 19:46 
GeneralRe: value_type of vector Pin
Stephen Hewitt18-Nov-07 20:01
Stephen Hewitt18-Nov-07 20:01 
GeneralRe: value_type of vector Pin
George_George18-Nov-07 20:47
George_George18-Nov-07 20:47 
GeneralRe: value_type of vector Pin
Stephen Hewitt19-Nov-07 12:38
Stephen Hewitt19-Nov-07 12:38 
GeneralRe: value_type of vector Pin
George_George19-Nov-07 15:38
George_George19-Nov-07 15:38 

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.