the problem is not too call this api ;) the call seems to work fine but the call back is returning strange character
an example is in the debug.txt file attach to this post...
in the vb example he use somekind of string to unicode function just before printing the fontname, but i cant find something similar to use with aurora
does anyone know how to handle this kind of string? and what is these strange characters means?
Search the forum for unicode functions. The built in conversions are A2W and W2A.
ok , if i search the forum i see that only sapero has use it so far ... well , not good for me :P
as i see i think i must use something like #ifdef UNICODE with the a2w function because if i dont, a2w is saying im undeclared...
so my next questions is (remember that im going on a road ive never tryed before ;) )
how did i use correctly the a2w with something like :
Global sub GetSysFonts(int hdc)
{
EnumFontFamilies(hdc,NULL,&GetSysFontsCallback,0);
return true;
}
Global sub GetSysFontsCallback(LOGFONT lpNLF,NEWTEXTMETRIC lpNTM, int FontType, int LParam),int
{
string fontname;
fontname = a2w(lpNLF.lfFaceName);
messagebox(0,fontname,"")
return true;
}
Sorry I meant s2w and w2s.
string to wide character, wide character to string. And they are a simple in/out function. wide = s2w("a string")
a2w/w2a are the C functions (macros actually). And if you want to specify a unicode literal, prefix it with L. print( L"Unicode" ); // Printing unicode strings doesn't work though last time I checked.
thanx, ill try to do something with that :)
finally got it to get the right font name ... this is the function that works...
lstrcpynA(fontname,lpNLF.lfFaceName,32);