Thread: show hidden window!

  1. #1
    Registered User
    Join Date
    Dec 2010
    Location
    Delhi, India
    Posts
    59

    Smile show hidden window!

    Hi all,
    I am making a program in which one window creates another window when a button is pressed and is itself hidden using:
    Code:
     ShowWindow(hwnd,SW_HIDE);
    This works fine and the former window hides. But then when I try to restore this window using a button on the newly created window, I am unable to do so. What should be the second argument to ShowWindow to restore the hidden window so that its displayed in its regular size as before.
    Any help would be appreciated!!

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    SW_SHOW

    IIRC SW_HIDE = 0 and SW_SHOW =1 (but I would not rely on it...)
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  3. #3
    Registered User
    Join Date
    Dec 2010
    Location
    Delhi, India
    Posts
    59
    Thanks for the suggestion, but it didn't work, it seems there's something wrong with my code.. I will debug it again and see if it works or not.

  4. #4
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Well, you could always look the function up in the SDK...

    Download Details - Microsoft Download Center - Microsoft Windows 7 SDK (ISO)

    or on MSDN

    ShowWindow Function (Windows)

  5. #5
    Registered User
    Join Date
    Dec 2010
    Location
    Delhi, India
    Posts
    59
    @CommonTater
    I did look it up in MSDN.. but couldn't judge which one should be made the second argument.. anyways thanks for the suggestion,the problem has been resolved.. there was a minor error in my code..

  6. #6
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by gaurav_13191 View Post
    @CommonTater
    I did look it up in MSDN.. but couldn't judge which one should be made the second argument.. anyways thanks for the suggestion,the problem has been resolved.. there was a minor error in my code..
    So you try the most likely candidates until you find the right one... Once again, simple experiments....

  7. #7
    Registered User
    Join Date
    Dec 2010
    Location
    Delhi, India
    Posts
    59
    @CommonTater
    Sure.. I will keep that in mind..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can't get window to show
    By GlitchGuy2 in forum Game Programming
    Replies: 2
    Last Post: 06-02-2009, 06:15 PM
  2. show window minimized maximized without focus taken
    By eXistenZ in forum Windows Programming
    Replies: 16
    Last Post: 12-15-2008, 12:38 PM
  3. window wont show on menu command!?
    By psychopath in forum Windows Programming
    Replies: 5
    Last Post: 06-20-2004, 01:11 PM
  4. How to show a window
    By peter in forum Windows Programming
    Replies: 3
    Last Post: 03-12-2003, 02:57 PM
  5. Window won't show
    By Toraton in forum Windows Programming
    Replies: 4
    Last Post: 11-10-2002, 08:07 PM