Thread: Owner running away!

  1. #1
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158

    Owner running away!

    I'm creating window a and using window b as the owner, but when I destroy a, the window directly behind b pops in front. Why is this so? I'm currently using SetForegroundWindow to compensate, but it causes it to flash. What should I do to fix this?

  2. #2
    Registered User
    Join Date
    Mar 2007
    Posts
    142
    Maybe this can help: The correct order for disabling and enabling windows

    In short: first reenable the owner and then destroy the modal child.

  3. #3
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    That does it, thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 13
    Last Post: 12-09-2008, 11:09 AM
  2. Check number of times a process is running
    By linuxwolf in forum Windows Programming
    Replies: 6
    Last Post: 10-17-2008, 11:08 AM
  3. Monitor a running instance of MS Word
    By BobS0327 in forum C# Programming
    Replies: 0
    Last Post: 07-18-2008, 12:40 PM
  4. Replies: 2
    Last Post: 05-12-2006, 10:28 AM
  5. multithreading question
    By ichijoji in forum C++ Programming
    Replies: 7
    Last Post: 04-12-2005, 10:59 PM