Results 1 to 4 of 4

Thread: bind MFC Library

  1. #1
    Join Date
    Oct 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default bind MFC Library

    Hello,
    I want to bind a Library written in MFC into my Qt Project and call its functions like this:
    BOOL CALLBACK eventInit(DWORD dwDevice, HANDLE hEvent, LPTHREAD_START_ROUTINE pFunc, UINT msg, ULONG ulMask);

    I have lib and dll files, but i have not header files. is there a example to show how can i do it?
    and can Qt understand the windows type like DWORD, HANDLE, LPTHREAD_START_ROUTINE etc?

    Thanks for your help!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: bind MFC Library

    Qt can't understand those as Qt is a library so it doesn't need to understand them. Your compiler needs to and will understand them.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: bind MFC Library

    so, i need a short code example that shows how it works: Bind a MFC Lib and call it's function.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: bind MFC Library

    MFC is by no means different than any other C/C++ library. Add the library to LIBS, header file paths to INCLUDEPATH and include/call the functions you need.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Bind Table Name at run time..
    By chaaruu in forum Newbie
    Replies: 2
    Last Post: 13th February 2012, 23:39
  2. [QGLWidget] Cannot bind texture
    By Macok in forum Qt Programming
    Replies: 1
    Last Post: 5th April 2009, 19:53
  3. how to bind code to threads
    By prasanth.nvs in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 5th February 2009, 16:16
  4. UdpSocket bind warning--pls have a look
    By swamyonline in forum Qt Programming
    Replies: 0
    Last Post: 28th August 2008, 11:42
  5. Bind a QComboBox to a Database
    By onefootswill in forum Newbie
    Replies: 4
    Last Post: 16th August 2008, 13:26

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.