How to use the Windows API in MinGW?

后端 未结 2 1462
闹比i
闹比i 2020-12-09 08:28

How to use the Windows API in MinGW?

相关标签:
2条回答
  • 2020-12-09 08:56

    Whenever I've done this, I just

    #include <windows.h>
    

    and start coding. MinGW comes with a windows.h file so you don't need to do anything extra.

    0 讨论(0)
  • 2020-12-09 08:56

    I occasionally use the Windows API for Qt apps that I build using Qt Creator/MinGW - I just #include the appropriate Windows SDK header (the headers come with MinGW) and it just works. However, you may need to #define a few things in order that some API calls are exposed. For example, I recently needed to call SHGetSpecialFolderPath (found in shlobj.h) but needed to define _WIN32_IE to 0x0400 first.

    0 讨论(0)
提交回复
热议问题