Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding windows aplication on taskbar

Status
Not open for further replies.

Wings

Programmer
Feb 14, 2002
247
US
Hi

I have a windows application that uses the createprocess()
function to create another window application. Does any one know how to keep the second process from appearing on the task bar? I am running windows 2000.

Appreciate the help
 
There are a couple of options. If you are writing the called program, look at or If you want to hide the called program from CreateProcess try the following from faq101-1954:
Code:
STARTUPINFO StartInfo; // name structure
PROCESS_INFORMATION ProcInfo; // name structure
memset(&ProcInfo, 0, sizeof(ProcInfo)); // Set up memory block
memset(&StartInfo, 0 , sizeof(StartInfo)); // Set up memory block
StartInfo.cb = sizeof(StartInfo); // Set structure size
StartInfo.dwFlags = STARTF_USESHOWNWINDOW; // Necessary for wShowWindow to work
StartInfo.wShowWindow = SW_HIDE; // Hide window
int res = CreateProcess(NULL, "MyApp.exe", NULL, NULL, NULL, NULL, NULL, NULL, &StartInfo, &ProcInfo); // starts MyApp

The key is SW_HIDE James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that they think I am now
qualified to do anything with nothing.
 
I just set it up as a tool window in WinMain()

Thanks for the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top