By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,382 Members | 1,567 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,382 IT Pros & Developers. It's quick & easy.

ShellExecuteEx

P: n/a
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

Dec 27 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
"raj" <ra*****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com
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.

--
John Carson
Dec 27 '05 #2

P: n/a

"raj" <ra*****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
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);
Dec 27 '05 #3

P: n/a

"raj" <ra*****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
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);
Dec 27 '05 #4

P: n/a

"raj" <ra*****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
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);
Dec 27 '05 #5

P: n/a
oops .. apologies for the duplicate posts ..
Dec 27 '05 #6

P: n/a
"code_wrong" <ta*@tac.co.uk> writes:
"raj" <ra*****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
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


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
Dec 29 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.