cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

P3ndldqny2
Journeyman III

Build error on ATI Stream examples, is this a bug?

error C2664: 'SetWindowTextA' : cannot convert parameter 2 from 'LPCWSTR' to 'LPCSTR'

Error 1 error C2664: 'SetWindowTextA' : cannot convert parameter 2 from 'LPCWSTR' to 'LPCSTR' C:\Users\Rob\Documents\ATI Stream\samples\opencl\cl\app\SimpleDX10\SimpleDX10.cpp 399 1 SimpleDX10VS10

Error 2 error C2440: 'initializing' : cannot convert from 'LPCWSTR' to 'LPCSTR' C:\Users\Rob\Documents\ATI Stream\samples\opencl\cl\app\SimpleDX10\SimpleDX10.cpp 1396 1 SimpleDX10VS10

Error 3 error C2664: 'CreateWindowExA' : cannot convert parameter 2 from 'LPCWSTR' to 'LPCSTR' C:\Users\Rob\Documents\ATI Stream\samples\opencl\cl\app\SimpleDX10\SimpleDX10.cpp 1413 1 SimpleDX10VS10

Error 4 error C2664: 'UnregisterClassA' : cannot convert parameter 1 from 'LPCWSTR' to 'LPCSTR' C:\Users\Rob\Documents\ATI Stream\samples\opencl\cl\app\SimpleDX10\SimpleDX10.cpp 1442 1 SimpleDX10VS10

Anybody know what the issue is? I downloaded the directX SDK, windows SDK and (obviously) ATI Stream SDK....

0 Likes
1 Reply
tanq
Journeyman III

You mixed unicode and non-unicode definitions. LPCWSTR defined as wchar_t and it works woth SetWindowTextW. SetWindowTextA is ASCII function and it works with char. Check macro definitions for _UNICODE and the like. You have to switch on all that macros, including _UNICODE __UNICODE UNICODE and may be something else, or switch all them off.

0 Likes