Results 1 to 7 of 7

Thread: How to host the other process's window in a program?

  1. #1
    Join Date
    Oct 2009
    Posts
    32
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default How to host the other process's window in a program?

    I want to write a program, it can host the other process's window, the other process can work standalone, when I host the other process's window, the other process's window hasn't system menu, hasn't titlebar, can't resize. how to implement it? thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to host the other process's window in a program?

    I guess it can be done by asking the system for the window handle you want.
    But most likely we can offer you a more "sane" way to accomplish what it is you want to do, if you explain to us what exactly you are trying to achieve.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Oct 2009
    Posts
    32
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to host the other process's window in a program?

    Quote Originally Posted by high_flyer View Post
    I guess it can be done by asking the system for the window handle you want.
    But most likely we can offer you a more "sane" way to accomplish what it is you want to do, if you explain to us what exactly you are trying to achieve.
    You can get my problem from the attachment's jpg file. I want to put the process B's window and process C's window in the process A's window,
    and the process B and process C then run standalone, and them also can embed in process A, only the launch's parameter is different. you can get the detail information in the attachment's jpg. thanks. how to implement it?
    Attached Images Attached Images

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to host the other process's window in a program?

    As I said, you can probably use system calls to get the id of the windows you want, if it is the only way you want to implement your application.
    This function (for windows, for linux you can google) might be a good string point.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Oct 2009
    Posts
    32
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to host the other process's window in a program?

    Do you mean is use different code in different platform?

  6. #6
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to host the other process's window in a program?

    Yes, since these are system calls, you will have to have the correct code per system.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  7. #7
    Join Date
    Mar 2009
    Posts
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to host the other process's window in a program?

    If you are on Linux/X11 you may be able to use QX11EmbedWidget and QX11EmbedContainer

Similar Threads

  1. Replies: 6
    Last Post: 28th October 2009, 13:17
  2. x86 host, mips target
    By zeitcheist in forum Installation and Deployment
    Replies: 1
    Last Post: 4th May 2009, 04:35
  3. execute sth before program exits (user closes window)
    By donglebob in forum Qt Programming
    Replies: 6
    Last Post: 9th December 2008, 23:24
  4. Program that just shows a window
    By claudio-cit in forum Newbie
    Replies: 2
    Last Post: 5th July 2008, 09:55
  5. load pixmap from another host
    By raphaelf in forum Newbie
    Replies: 16
    Last Post: 31st August 2006, 22:58

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.