[Solved] Missing WinApi function

  • Maybe this isnt pure QT related problem, but i cant find out whats wrong
    i have a main.cpp file, where are, among the others, these header files included
    @#include <windows.h>
    #include <winuser.h>
    then, in a callback function there is this piece of code

    info.cbSize = sizeof(GUITHREADINFO);
    if(GetGUIThreadInfo(0, &info))
    //some action

    when i try to build this, i get this error

    main.cpp:116: error: 'GUITHREADINFO' was not declared in this scope
    main.cpp:116: error: expected ';' before 'info'
    main.cpp:117: error: 'info' was not declared in this scope
    main.cpp:193: error: 'GetGUIThreadInfo' was not declared in this scope

    ive checked header file and i found this line
    @#if (WINVER >= 0x0500)

    so i really dont get this behavious, any help apprecieted

    //well, ive solved the problem just after i posted it :)
    for some strange reason, i found out, that in the windef.h file was WINVER defined as 0x0400
    so i simply had to redefined it before including ani window header file to some higher value, and problem is solved :)

  • Moderators

    Add [Solved] to the thread's subject, then. It took me some time to read the whole post just to find the note at the end.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.