Thread: Disabling a window

  1. #1
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    New York
    Posts
    1,905

    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,227
    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, 08: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, 10:50 AM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM