February 4, 200422 yr Hi does anyone know how to map to a WCHAR string for use in gdi+? sprintf etc aren't working for some reason and im not too keen about writing my own string mapping routines and classes. Is there some sort of easy conversion?-Jon
February 4, 200422 yr Author wsprintf should do it. ;) Matt KaprockiFor fastest support, please submit a ticket at http://support.precisionmanuals.com
February 4, 200422 yr I keep getting an error with this code: //Altitude StringWCHAR altitude[6] = L"50000";wsprintf(&altitude, "%5f", hgs_alt.var_value.n);because of the first parameter in wsprintfand I get an error with the draw string with the first parameter in this code: wsprintf(altitude, "%5f", hgs_alt.var_value.n); FontFamily fontFamily(L"Arial"); Font font(&fontFamily, 15, FontStyleBold, UnitPoint); RectF altrec(899.0f, 271.0f, 70.0f, 23.0f); gdip_drawer.DrawString(&altitude, -1, &font, altrec, NULL, &solidBrush);
February 4, 200422 yr Author Sorry about that, my mistake....swprintf is what you want, not wsprintf. D'oh!WCHAR value_buffer<5>;swprintf(value_buffer, L"%f", .5); Matt KaprockiFor fastest support, please submit a ticket at http://support.precisionmanuals.com
Create an account or sign in to comment