Jump to content
  • Advertisement
Sign in to follow this  

Create no window,but still creates it

This topic is 1968 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


    ZeroMemory( &si, sizeof(si) );
    si.cb = sizeof(si);
    ZeroMemory( &pi, sizeof(pi) );
	si.wShowWindow = FALSE; 
    // Start the child process.
    if( !CreateProcess( NULL,chrPathtoExeFile,NULL,NULL,TRUE,CREATE_NO_WINDOW,NULL,NULL,&si,&pi ))
        //printf( "win32::CreateProcess Error::: (%d).\n", GetLastError() );

    // Close process and thread handles.
    //CloseHandle( pi.hProcess );
    //CloseHandle( pi.hThread );


This line is the problem:


CreateProcess( NULL,chrPathtoExeFile,NULL,NULL,TRUE,CREATE_NO_WINDOW,NULL,NULL,&si,&pi )



why does it create the window when i launch a certain app? i want the windows of that app to be invisible

Share this post

Link to post
Share on other sites
Is the process you are spawning a console app? If not, then the CREATE_NO_WINDOW flag doesn't apply.

Share this post

Link to post
Share on other sites

SiCrane meant that if you're creating a process that isn't a console application, the CREATE_NO_WINDOW flag is ignored... i.e. only console applications will spawn without a window.

Share this post

Link to post
Share on other sites

Is it a 3rd party application or your own application?


If it is your own application you can setup command line arguments to hide the window.


If it is a 3rd party application, then you can get the top level window handle with FindWindow then call ShowWindow to hide it. I've never done it myself but I guess it could work...

Edited by renega_666

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!