PDA

View Full Version : bind MFC Library



rock1411
26th October 2012, 12:45
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!

wysota
26th October 2012, 14:01
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.

rock1411
28th October 2012, 12:52
so, i need a short code example that shows how it works: Bind a MFC Lib and call it's function.

wysota
28th October 2012, 17:50
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.