PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Compile Issue

Anyone know why I'd receive the following error:

error C2664: 'long __cdecl CGapiSurface::DrawTextW(unsigned long,unsigned long,const unsigned short *,class CGapiBitmapFont *,unsigned long,struct _GDTEXTFX *,unsigned long *)' : cann
ot convert parameter 3 from 'char [10]' to 'const unsigned short *'

I recently finished my app in VC++ and then setup a project in eVC++ and now I receive this error with the same codebase.

Any ideas?
Thanks!
Greg
eyespy · 29 Mar 2003, 04:33 UTC — Found same issue : different thread
I found that someone else had the same issue in another thread but I don't necessarily see a solution when using a variable within the DrawText().

http://forums.pocketmatrix.com/viewtopic.php?t=7248&highlight=c2664

Here's my DrawText line....

Code:

m_backbuffer.DrawText( f.left, f.top, Item[i]->Tag, RGB(255,255,255),GDDRAWTEXT_BORDER, 0,0);


Any help would be pure greatness...
Make sure you are using TCHARs for the text. It should work fine if Item[i]->Tag is a pointer to a TCHAR. Worst case, you could _stprintf( ) your Tag into a TCHAR array and pass that instead.