Results 1 to 2 of 2

Thread: Winapi in Qt

  1. #1
    Join Date
    Mar 2009
    Posts
    29
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Winapi in Qt

    Hi, I want using Winapi in Qt, but Qt environment don't allow me. When I added #include <windows.h> Qt didn't found it. So I add libraries manually, but it don't work correctly.
    It's result after my test:

    I suppose that lack some library files.
    How can i solve it? Anyone know where can I download winapi libraries?

  2. #2
    Join Date
    Feb 2009
    Posts
    33
    Thanks
    6
    Thanked 7 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Winapi in Qt

    The error pictured indicates a Unicode/ASCII issue which you can fix by prepending "AppClass" with an uppercase "L".

    For example...
    Qt Code:
    1. ...
    2.  
    3. HWND hAppClient = 0;
    4. hAppClient = FindWindow(L"AppClass", 0);
    5.  
    6. ...
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to andy.fillebrown for this useful post:

    Trok (19th July 2009)

Similar Threads

  1. Using WinAPI FindWindow with Qt
    By emostar in forum Qt Programming
    Replies: 16
    Last Post: 11th July 2009, 09:27
  2. Getting QLabel to work with WinAPI GetWindowText?
    By m.parker in forum Qt Programming
    Replies: 3
    Last Post: 22nd December 2006, 21:22

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
  •  
Qt is a trademark of The Qt Company.