Results 1 to 14 of 14

Thread: Getting the handle of the window

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Getting the handle of the window

    If this is a Windows application, then maybe a better solution would be that App2 sets its Parent window property to that of App1, and App3 sets its Parent window property to that of App2, then the Windows will behave as if they were all in the same app and you don't have to do any of this monitoring events and bringing other processes windows to the front (which may fail on Windows7 without UAC compliance)

  2. #2
    Join Date
    Jan 2010
    Posts
    190
    Thanks
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Getting the handle of the window

    Quote Originally Posted by wysota View Post
    This is all a bit weird design, I have to admit A window instead of lowering itself is artificially raising another window so that it can raise yet another window? Hmm... If you can't change this design, at least design W2 and W3 applications in a better way - provide some IPC mechanism to communicate between them and try to find a way for the first application to change its behaviour to something more sane The problem you are experiencing seems to be with W1 and not W2 so there isn't much you can do in W2 to change that.
    I completely agree with you. This is not a good architecture, but I cannot change W1. I can only work on W2 and W3, so I'm trying to find any way to understand when those two functions are called to bring up W2, without success...
    I thought I could work with focusIn events. When ShowWindow and SetForegroundWindow are called, W2 comes over, and I suppose some focusIn events will arrive. Unfortunately I cannot predict to which widget they'll arrive, right?

    Quote Originally Posted by fatjuicymole View Post
    If this is a Windows application, then maybe a better solution would be that App2 sets its Parent window property to that of App1, and App3 sets its Parent window property to that of App2, then the Windows will behave as if they were all in the same app and you don't have to do any of this monitoring events and bringing other processes windows to the front (which may fail on Windows7 without UAC compliance)
    The problem is that W1 is C#, W2 is Qt and W3 can be whatever. I cannot change W1, so it is calling ShowWindow and SetForegroundWindow to W2. This means that anything I can do, I suppose, cannot change the fact that W2 is overlapping W3 This is quite a mess, I know

    Many thanks for your help guys!

Similar Threads

  1. Best way to handle XML fragments?
    By pherthyl in forum Qt Programming
    Replies: 2
    Last Post: 19th January 2010, 18:21
  2. Can Qt handle pdf documents???
    By webquinty in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 23rd March 2009, 15:16
  3. Replies: 7
    Last Post: 17th July 2008, 21:47
  4. Replies: 11
    Last Post: 4th June 2008, 07:22
  5. How to Handle new Qt?
    By ashukla in forum General Programming
    Replies: 3
    Last Post: 3rd March 2008, 11:50

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.