PDA

View Full Version : QAxWidget



ToddAtWSU
3rd February 2006, 14:42
I am getting 73 errors by just adding the line:


#include <qaxwidget.h>

The errors seem to be occuring in files called statreg.h and atlbase.h. Has anybody else had these problems? I am using MS VS.Net. The errors I get are:

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\statreg.h(55): error C2440: 'initializing' : cannot convert from 'const char [2]' to 'const LPCTSTR'

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\statreg.h(602): error C2440: 'initializing' : cannot convert from 'const char [21]' to 'const TCHAR *const '

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\statreg.h(844): error C2446: ':' : no conversion from 'LPCTSTR' to 'const char *'

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlbase.h(5297): error C2664: 'ATL::CRegKey::Open' : cannot convert parameter 2 from 'const char [6]' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

Thanks for any help anyone has if they have had the same problems!

Todd

jacek
3rd February 2006, 16:58
The problem is that Qt internally uses Unicode to store strings and therefore it uses "wide" characters.

Make sure all Qt headers are included before other headers.

ToddAtWSU
3rd February 2006, 18:29
Thanks...that seems to have fixed the problem!