Thread: Simple Windows Question

  1. #1
    Registered User samGwilliam's Avatar
    Join Date
    Feb 2002
    Location
    Newport
    Posts
    382

    Simple Windows Question

    I have a program with 2 windows, one main and an auxilliary one. When I close the auxilliary one, I can't get it to show again (with the ShowWindow () function).

    I'm guessing it's being destroyed - not simply hidden - even though I'm issuing a hide command from the window's event handler (under WM_CLOSE). I'm destroying both from the main window's WM_CLOSE.

    Can anyone help? I'm guessing it's going to be something simple...
    Current Setup: Win 10 with Code::Blocks 17.12 (GNU GCC)

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Make sure that DefWindowProc() isn't handling the message and that you return 0 from your message handler after hiding the window.

    gg

  3. #3
    Registered User samGwilliam's Avatar
    Join Date
    Feb 2002
    Location
    Newport
    Posts
    382
    That fixed it, thanks!
    Current Setup: Win 10 with Code::Blocks 17.12 (GNU GCC)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. MFC simple question
    By dole.doug in forum Windows Programming
    Replies: 5
    Last Post: 09-26-2008, 06:11 AM
  2. A question about windows programming
    By Hussain Hani in forum Windows Programming
    Replies: 16
    Last Post: 05-23-2007, 07:38 AM
  3. Replies: 5
    Last Post: 08-16-2006, 02:05 PM
  4. Simple fp_in question.
    By BluePudding in forum C++ Programming
    Replies: 5
    Last Post: 08-09-2006, 08:18 AM
  5. General question about Windows resources
    By Boomba in forum Windows Programming
    Replies: 2
    Last Post: 07-19-2004, 09:36 PM