pooja_jha

Hello Friends,

I am able to kill cprog.exe, but when I resume cprog it opens in maximize form. I want it open in background so that it cannot be seen.

Plz help in any form either with code or explanation.............

Any help would be appreciated.

Thanks & Regards,

Pooja Bajpai.



Re: Smart Devices Native C++ Development problem of cprog.exe

Patrick Getzmann

You can try ShellExecuteEx function. http://msdn2.microsoft.com/en-us/library/aa923541.aspx

Set the nShow parameter of the SHELLEXECUTEINFO struct to SW_HIDE.





Re: Smart Devices Native C++ Development problem of cprog.exe

pooja_jha

Thank You Patrick,

I have already tried this but it not works. Tell me something else which works.......

Thanks again for such quick response....

Any help would be appreciated.

Thanks & Regards,

Pooja Bajpai.





Re: Smart Devices Native C++ Development problem of cprog.exe

Patrick Getzmann

Than you only option will be hiding the window. That worked in my emulator.

Code Block

HWND hFound = ::FindWindow(NULL,L"Phone");

if(hFound)

::ShowWindow(hFound,SW_HIDE);

Maybe you should use a more advanced search for the window as there could be more Windows with that title.

You can enum ChildWindows of the Window. Just take a look in RemoteSpy. Maybe there is a Window Class name or something else that you can check.