Owner running away!

This is a discussion on Owner running away! within the Windows Programming forums, part of the Platform Specific Boards category; I'm creating window a and using window b as the owner, but when I destroy a, the window directly behind ...

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

    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?
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  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
    1,678
    That does it, thanks.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

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, 12:08 PM
  3. Monitor a running instance of MS Word
    By BobS0327 in forum C# Programming
    Replies: 0
    Last Post: 07-18-2008, 01:40 PM
  4. Replies: 2
    Last Post: 05-12-2006, 11:28 AM
  5. multithreading question
    By ichijoji in forum C++ Programming
    Replies: 7
    Last Post: 04-12-2005, 11:59 PM

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