Window Minimization problem
-
Hi, i am using ShellExecuteEx function in an Embeded VC++(MFC Based) to run other application(not MFC) but its Window not get Minimized though i am passing ShExecInfo.nShow = SW_MINIMIZE parameter. My Code is: BOOL CSBCApp::InitInstance() { CMainFrame* pFrame = new CMainFrame; m_pMainWnd = pFrame; pFrame->LoadFrame(IDR_MAINFRAME, WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, NULL); SHELLEXECUTEINFO ShExecInfo = {0}; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; ShExecInfo.hwnd = NULL; ShExecInfo.lpVerb = NULL; ShExecInfo.lpFile = _T("Disk\\MyTest.exe"); ShExecInfo.lpParameters = _T(""); ShExecInfo.lpDirectory = NULL; ShExecInfo.nShow = SW_MINIMIZE; ShExecInfo.hInstApp = NULL; bool ReturnType=ShellExecuteEx(&ShExecInfo); // The one and only window has been initialized, so show and update it. pFrame->ShowWindow(m_nCmdShow); pFrame->UpdateWindow(); return TRUE; } Warm Regards,
priyank
-
Hi, i am using ShellExecuteEx function in an Embeded VC++(MFC Based) to run other application(not MFC) but its Window not get Minimized though i am passing ShExecInfo.nShow = SW_MINIMIZE parameter. My Code is: BOOL CSBCApp::InitInstance() { CMainFrame* pFrame = new CMainFrame; m_pMainWnd = pFrame; pFrame->LoadFrame(IDR_MAINFRAME, WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, NULL); SHELLEXECUTEINFO ShExecInfo = {0}; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; ShExecInfo.hwnd = NULL; ShExecInfo.lpVerb = NULL; ShExecInfo.lpFile = _T("Disk\\MyTest.exe"); ShExecInfo.lpParameters = _T(""); ShExecInfo.lpDirectory = NULL; ShExecInfo.nShow = SW_MINIMIZE; ShExecInfo.hInstApp = NULL; bool ReturnType=ShellExecuteEx(&ShExecInfo); // The one and only window has been initialized, so show and update it. pFrame->ShowWindow(m_nCmdShow); pFrame->UpdateWindow(); return TRUE; } Warm Regards,
priyank
pri_skit wrote:
ShExecInfo.nShow = SW_MINIMIZE;
Use
SW_SHOWMINIMIZED
instead.Prasad Notifier using ATL | Operator new[],delete[][^]
-
pri_skit wrote:
ShExecInfo.nShow = SW_MINIMIZE;
Use
SW_SHOWMINIMIZED
instead.Prasad Notifier using ATL | Operator new[],delete[][^]
-
WINDOW CE(5.0) does not support SW_SHOWMINIMIZED. Message displayed: error C2065: 'SW_SHOWMINIMIZED' : undeclared identifier
priyank
pri_skit wrote:
WINDOW CE(5.0) does not support SW_SHOWMINIMIZED
Yes. I overseen
WinCE
in your original post. With available options forShowWindow
onWinCE
it doesn't seem possible.Prasad Notifier using ATL | Operator new[],delete[][^]
-
WINDOW CE(5.0) does not support SW_SHOWMINIMIZED. Message displayed: error C2065: 'SW_SHOWMINIMIZED' : undeclared identifier
priyank
Only the following are supported in WinCE.
SW_SHOW, SW_HIDE, SW_SHOWNORMAL, SW_SHOWNA
If your requirement is to create a new window but to retain the topmost state of your current window, then create the new window withSW_SHOWNA
as thenCmdShow
parameter toShowWindow()
.
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
-
Hi, i am using ShellExecuteEx function in an Embeded VC++(MFC Based) to run other application(not MFC) but its Window not get Minimized though i am passing ShExecInfo.nShow = SW_MINIMIZE parameter. My Code is: BOOL CSBCApp::InitInstance() { CMainFrame* pFrame = new CMainFrame; m_pMainWnd = pFrame; pFrame->LoadFrame(IDR_MAINFRAME, WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, NULL); SHELLEXECUTEINFO ShExecInfo = {0}; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; ShExecInfo.hwnd = NULL; ShExecInfo.lpVerb = NULL; ShExecInfo.lpFile = _T("Disk\\MyTest.exe"); ShExecInfo.lpParameters = _T(""); ShExecInfo.lpDirectory = NULL; ShExecInfo.nShow = SW_MINIMIZE; ShExecInfo.hInstApp = NULL; bool ReturnType=ShellExecuteEx(&ShExecInfo); // The one and only window has been initialized, so show and update it. pFrame->ShowWindow(m_nCmdShow); pFrame->UpdateWindow(); return TRUE; } Warm Regards,
priyank
you specified the window to minimize ShExecInfo.nShow = SW_MINIMIZE; you are again specifying the window to show with m_nCmdShow pFrame->ShowWindow(m_nCmdShow); it depends on m_nCmdShow. comment Show and UpdateWindow functions. it may work. HTH, -- Murali Krishna.
-
you specified the window to minimize ShExecInfo.nShow = SW_MINIMIZE; you are again specifying the window to show with m_nCmdShow pFrame->ShowWindow(m_nCmdShow); it depends on m_nCmdShow. comment Show and UpdateWindow functions. it may work. HTH, -- Murali Krishna.