ShellExecuteEx

R

raj

Hi,
I want to execute an Exe file in minimize mode. but when i m trying the
following

SHELLEXECUTEINFO lpExecInfo;
memset(&lpExecInfo, 0, sizeof(SHELLEXECUTEINFO));

lpExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
lpExecInfo.lpFile = _T("\\Program
Files\\Nortel\\DMMVPN3100\\sbipsecGUI.exe");
lpExecInfo.lpParameters = _T("");
lpExecInfo.lpDirectory = _T("");
lpExecInfo.lpVerb = _T("open");
lpExecInfo.nShow = SW_MINIMIZE;
lpExecInfo.fMask = 0;
lpExecInfo.hwnd = this->m_hWnd;
lpExecInfo.hInstApp = AfxGetInstanceHandle();

ShellExecuteEx(&lpExecInfo);

The application starts but in normal/maximize mode. Ane guidence is
appreciable


Thanks in advance
Rajat
 
J

John Carson

raj said:
Hi,
I want to execute an Exe file in minimize mode. but when i m trying
the following

SHELLEXECUTEINFO lpExecInfo;
memset(&lpExecInfo, 0, sizeof(SHELLEXECUTEINFO));

lpExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
lpExecInfo.lpFile = _T("\\Program
Files\\Nortel\\DMMVPN3100\\sbipsecGUI.exe");
lpExecInfo.lpParameters = _T("");
lpExecInfo.lpDirectory = _T("");
lpExecInfo.lpVerb = _T("open");
lpExecInfo.nShow = SW_MINIMIZE;
lpExecInfo.fMask = 0;
lpExecInfo.hwnd = this->m_hWnd;
lpExecInfo.hInstApp = AfxGetInstanceHandle();

ShellExecuteEx(&lpExecInfo);

The application starts but in normal/maximize mode. Ane guidence is
appreciable


This is Windows-specific and off topic here. An appropriate group is

microsoft.public.vc.language

Since you are here, the nShow field determines what is passed as the last
parameter to WinMain. It is up to the application whether it takes any
notice of this parameter. Unfortunately for you, the Norton program
apparently takes no notice. Your best bet may be to try to minimize the
Norton window after the program has been launched.
 
C

code_wrong

raj said:
Hi,
I want to execute an Exe file in minimize mode. but when i m trying the
following

SHELLEXECUTEINFO lpExecInfo;
memset(&lpExecInfo, 0, sizeof(SHELLEXECUTEINFO));

lpExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
lpExecInfo.lpFile = _T("\\Program
Files\\Nortel\\DMMVPN3100\\sbipsecGUI.exe");
lpExecInfo.lpParameters = _T("");
lpExecInfo.lpDirectory = _T("");
lpExecInfo.lpVerb = _T("open");
lpExecInfo.nShow = SW_MINIMIZE;
lpExecInfo.fMask = 0;
lpExecInfo.hwnd = this->m_hWnd;
lpExecInfo.hInstApp = AfxGetInstanceHandle();

ShellExecuteEx(&lpExecInfo);

The application starts but in normal/maximize mode. Ane guidence is
appreciable
forget ShellExecuteEx use ShellExecute instead, much simpler
eg. your.exe is executed in the background
ShellExecute(0,"open","your.exe",0,0,0);
 
C

code_wrong

raj said:
Hi,
I want to execute an Exe file in minimize mode. but when i m trying the
following

SHELLEXECUTEINFO lpExecInfo;
memset(&lpExecInfo, 0, sizeof(SHELLEXECUTEINFO));

lpExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
lpExecInfo.lpFile = _T("\\Program
Files\\Nortel\\DMMVPN3100\\sbipsecGUI.exe");
lpExecInfo.lpParameters = _T("");
lpExecInfo.lpDirectory = _T("");
lpExecInfo.lpVerb = _T("open");
lpExecInfo.nShow = SW_MINIMIZE;
lpExecInfo.fMask = 0;
lpExecInfo.hwnd = this->m_hWnd;
lpExecInfo.hInstApp = AfxGetInstanceHandle();

ShellExecuteEx(&lpExecInfo);

The application starts but in normal/maximize mode. Ane guidence is
appreciable
forget ShellExecuteEx use ShellExecute instead, much simpler
eg. your.exe is executed in the background
ShellExecute(0,"open","your.exe",0,0,0);
 
C

code_wrong

raj said:
Hi,
I want to execute an Exe file in minimize mode. but when i m trying the
following

SHELLEXECUTEINFO lpExecInfo;
memset(&lpExecInfo, 0, sizeof(SHELLEXECUTEINFO));

lpExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
lpExecInfo.lpFile = _T("\\Program
Files\\Nortel\\DMMVPN3100\\sbipsecGUI.exe");
lpExecInfo.lpParameters = _T("");
lpExecInfo.lpDirectory = _T("");
lpExecInfo.lpVerb = _T("open");
lpExecInfo.nShow = SW_MINIMIZE;
lpExecInfo.fMask = 0;
lpExecInfo.hwnd = this->m_hWnd;
lpExecInfo.hInstApp = AfxGetInstanceHandle();

ShellExecuteEx(&lpExecInfo);

The application starts but in normal/maximize mode. Ane guidence is
appreciable
forget ShellExecuteEx use ShellExecute instead, much simpler
eg. your.exe is executed in the background
ShellExecute(0,"open","your.exe",0,0,0);
 
N

Niklas Norrthon

code_wrong said:
forget ShellExecuteEx use ShellExecute instead, much simpler

Wrong.

The C++ language or standard library doesn't have a function
named ShellExecuteEX or ShellExecute.

Please don't post off topic answers to off topic questions. Direct the
OP to another group where it's on topic instead, or stay quiet.

/Niklas Norrthon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top