Qt World Summit: Submit your Presentation

Any need to configure for Win32?

  • Dear all,

    I'm developing an application using Win32 API with Qt.

    I used an structure from winuser.h namely KEYBDINPUT.

    I included windows.h (its doc in MSDN says it's enough). I used KBDLLHOOKSTRUCT which is also in winuser.h & it's fine.
    In winuser.h, it's defined as with #if clause. So, am I need to redefine WINVER ?
    How to define that?

    @#if (_WIN32_WINNT >= 0x0403)
    typedef struct tagKEYBDINPUT {
    WORD wVk;
    WORD wScan;
    DWORD dwFlags;
    DWORD time;
    ULONG_PTR dwExtraInfo;


  • ok.

    I define like that.
    @#define _WIN32_WINNT 0x0500@

    But, I would like to know how to set current windows version?


  • If i recall correctly you have to include windows.h before any other windows headers.

Log in to reply