1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

hidding a window

Discussion in 'Win32' started by pkl, Jul 13, 2008.

  1. pkl

    pkl New Member

    Joined:
    Jul 13, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    i need to make the window's program to be invisible...i made it with HWND but the window blink when i start the program...
    thankss
     
  2. Spogliani

    Spogliani New Member

    Joined:
    Jun 24, 2008
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    Milano, Italy
    If I understood correctly your problem you can hide a window using the ShowWindow() function as follows:

    Code:
    ShowWindow(YourWindowHandler, SW_HIDE);
    
    otherwise, if the window must be hidden from the beginning, you can keep it hidden removing the eventual WS_VISIBLE from the CreateWindow() function's stiles and avoiding the call to ShowWindow() for that window
     
  3. pkl

    pkl New Member

    Joined:
    Jul 13, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    and how can i do it?

    thanks
     
  4. Spogliani

    Spogliani New Member

    Joined:
    Jun 24, 2008
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    Milano, Italy
    Re: hiding a window

    When you create the window using the CreateWindow() function you have to enter some styles. If you add the WS_VISIBLE style the window will be visible from the beginning, if you don't add it you have to call the ShowWindow() function.

    If you don't add the WS_VISIBLE style AND you never call the ShowWindow() function for the window, it will never be shown.
     

Share This Page