SetOwner

This is a discussion on SetOwner within the Windows Programming forums, part of the Platform Specific Boards category; How do you set an 'owner window' toa window so it's always on top of that window? I'm not talking ...

  1. #1
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    SetOwner

    How do you set an 'owner window' toa window so it's always on top of that window? I'm not talking about setting a parent as it will clip the window inside its region. I have to make the call externally as I'm not calling CreateWindow (which has a field for owner/parent window) but CreateDialog.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,255
    Don't think you can:-
    Quote Originally Posted by http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowfeatures.asp
    After creating an owned window, an application cannot transfer ownership of the window to another window.

    Dialog boxes and message boxes are owned windows by default. An application specifies the owner window when calling a function that creates a dialog box or message box.
    Sorry.

  3. #3
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    I have to make the call externally as I'm not calling CreateWindow (which has a field for owner/parent window) but CreateDialog.
    Quote Originally Posted by MSDN CreateDialog
    hWndParent
    [in] Handle to the window that owns the dialog box.
    Is this not working? An alternative is to use SetWindowPos to alter the Z-order.

Popular pages Recent additions subscribe to a feed

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