Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to add Win32 .res file so I can use WinAPI DialogBox?
Forum Updated to NodeBB v4.3 + New Features

How to add Win32 .res file so I can use WinAPI DialogBox?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.4k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wqking
    wrote on last edited by
    #1

    Hi,

    I want to show a dialog from within a DLL written in Qt. The DLL doesn't use any Qt GUI, so I don't want to use any Qt GUI to avoid the large size Qt DLLs. So I want to use plain Windows API to do it. My DLL is native Windows only, no cross platform.
    I user some resource editor to create .rc file, then compile it to .res. However, I don't know how to add the .res to a Qt program.

    Question: How to embed the Win32 .res file to Qt program?

    Thanks

    My personal website https://www.kbasm.com/
    My Github https://github.com/wqking

    1 Reply Last reply
    0
    • W Offline
      W Offline
      wqking
      wrote on last edited by
      #2

      I found a solution. Add a post build step to use some res compiler to embed the resource file into the exe.
      But I would like to know if there is any better and Qt style way to do it.

      My personal website https://www.kbasm.com/
      My Github https://github.com/wqking

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        The platform notes contains a paragraph on the subject which should be of interest.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        W 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          The platform notes contains a paragraph on the subject which should be of interest.

          W Offline
          W Offline
          wqking
          wrote on last edited by
          #4

          @SGaist
          That's exactly what I need.
          Thank you very much.

          My personal website https://www.kbasm.com/
          My Github https://github.com/wqking

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            You're welcome !

            Since you have everything you need, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved