Disabling a window

This is a discussion on Disabling a window within the Windows Programming forums, part of the Platform Specific Boards category; how do i disable a window mid-program? Do I use the SendMessage function or something? The reason I'm trying to ...

  1. #1
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    University of Waterloo
    Posts
    1,903

    Disabling a window

    how do i disable a window mid-program? Do I use the SendMessage function or something?

    The reason I'm trying to do this is to make it so that when my popup dialogs pop-up, they disable the window that pop'ed 'em up so that you can't look at the other window again. Like when you click the Open thing, and the Open box comes up, you can't click the other window behind it, the titlebar just flashes a bit and the Open box is still in control...........

    thx

  2. #2
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Set the dialogs parent to be your main window, and make sure you create it as a Modal dialog.

  3. #3
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    Originally posted by Eibro
    Set the dialogs parent to be your main window, and make sure you create it as a Modal dialog.
    That's the correct answer.

    To actually disable a window, use EnableWindow(hWnd, FALSE)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 09:23 AM
  2. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  3. Pong is completed!!!
    By Shamino in forum Game Programming
    Replies: 11
    Last Post: 05-26-2005, 11:50 AM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 01:34 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21