Results 1 to 2 of 2

Thread: Call GUI(message box) from Dll

  1. #1
    Join Date
    Jul 2010
    Posts
    25
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Call GUI(message box) from Dll

    Hi,
    I have a dll in which I need to pop up a Message box.
    I do not have any QApplication as a parent. So I keep getting an error that I need to have a base GUI.
    Is the base GUI really necessary?
    Do I need to make an .exe file and then call the Message box from the dll?

    Your help is much appreciated.
    Thank you.

  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: Call GUI(message box) from Dll

    Is the base GUI really necessary?
    Yes, if you want to have your DLL have a GUI - a message box is a GUI.
    But the question is, do you really want your DLL to show a message box, or rather have an application which runs a gui, and links to your DLL.
    When the application makes a call to the DLL when the call returns to the application you can have it return with a status, and based on that status show a message box from your application.
    This will free your DLL from any dependency on GUI libs.
    ==========================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.

Similar Threads

  1. Replies: 4
    Last Post: 12th October 2008, 13:47
  2. Get Windows message
    By ^NyAw^ in forum Qt Programming
    Replies: 2
    Last Post: 7th April 2008, 10:28
  3. what does these debug message mean?
    By wesley in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 27th February 2008, 07:56

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.