Search found 15 matches: multibytetowidechar

Return to advanced search

Re: Listview Unicode for CLASS TGrid()

Question : is fw_parWide() the same as AnsiToWide() :?: No. if the parameter is UTF8 it uses "MultiByteToWideChar()", Windows API function and if not, then it is ANSI and uses AnsiToWide() See: https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar ...
by nageswaragunupudi
Wed Aug 30, 2023 2:50 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Listview Unicode for CLASS TGrid()
Replies: 7
Views: 409

Re: FWH 16.03 32 BIT

Hakan,

We need to find which function is calling MultiByteToWideChar as many functions from FWH and Harbour call it
by Antonio Linares
Wed May 11, 2016 11:22 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: FWH 16.03 32 BIT
Replies: 118
Views: 25334

Re: Correct way to call an external DLL?

... void f(BSTR ms_str) { std::wstring ws(ms_str); } //*--------------- BSTR ConvertMBSToBSTR(const std::string& str) { int wslen = ::MultiByteToWideChar(CP_ACP, 0 /* no flags */, str.data(), str.length(), NULL, 0); BSTR wsdata = ::SysAllocStringLen(NULL, wslen); ::MultiByteToWideChar(CP_ACP, ...
by Adolfo
Thu Aug 28, 2014 11:01 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Correct way to call an external DLL?
Replies: 12
Views: 2625

SOURCE FOR IMAGE WITH *.BMP *.EMF *.GIF *.ICO *.JPG *.PNG *

... HBITMAP TO FIVEWIN using namespace Gdiplus; HBITMAP IMAGE_HBITMAP_CPP(char * File_Name) { WCHAR wchPath[MAX_PATH]; ZeroMemory(wchPath,MAX_PATH); MultiByteToWideChar(CP_ACP, 0,File_Name, -1,wchPath, MAX_PATH ); GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; GdiplusStartup(&gdiplusToken, ...
by HATHAL
Sun Oct 06, 2013 8:46 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Cover Flow
Replies: 10
Views: 5584

Re: How to force locale to Serbian Latin

... // oemansi.cLPWSTR AnsiToWide( LPSTR cAnsi ){   WORD wLen;   LPWSTR cString;   ...    MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, cAnsi, -1, ( LPWSTR ) cString, wLen );   ...  AnsiToWide() is called everywhere. ...
by dmajkic
Fri Sep 07, 2012 9:00 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to force locale to Serbian Latin
Replies: 7
Views: 1601

Maurizio,

Please try this:

TCHAR * wName = ( TCHAR * ) hb_xgrab( len * sizeof( TCHAR ) );

MultiByteToWideChar( CP_ACP, 0 ,pW , -1 , wName, sizeof( wName ) / sizeof( wName[ 0 ] ) );
PDC_ExtTextOut(hPrDC,100,100, 0, NULL, wName, len * sizeof( TCHAR ) , NULL);
by Antonio Linares
Mon Oct 27, 2008 5:57 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Convert hb_parc() in LPTSTR
Replies: 25
Views: 5639

... : error C2133: 'wName' : unknown size Where : 147 - LPSTR pW = hb_parc( 1 ) ; 148 - int len = hb_parclen( 1 ); 149 - TCHAR wName[ len ]; 150 - MultiByteToWideChar( CP_ACP, 0 ,pW , -1 , wName, len * 2 ); Regards MAurizio
by Maurizio
Tue Oct 21, 2008 12:24 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Convert hb_parc() in LPTSTR
Replies: 25
Views: 5639

... the conversion in TCAHR now I found the solution : LPSTR pW ; pW = hb_parc( 1 ) ; int lenwName ; lenwName = sizeof(pW) ; TCHAR wName[sizeof(pW)]; MultiByteToWideChar( CP_ACP, 0 ,pW , -1 , wName, sizeof( wName ) / sizeof( wName[ 0 ] ) ); PDC_ExtTextOut(hPrDC,200,200, 0, NULL, wName, _tcslen(wName) ...
by Maurizio
Tue Oct 21, 2008 10:13 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Convert hb_parc() in LPTSTR
Replies: 25
Views: 5639

... lo solucionemos, ya que los textos se pasan a unicode y por lo visto no estamos usando los parámetros correctos en la conversión a unicode usando MultiByteToWideChar() gracias! :-)
by Antonio Linares
Thu Dec 06, 2007 6:32 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: FWH Resources Editor - Speed test
Replies: 85
Views: 18077

... Latin/Brazilian characters. The accented char is wrong displayed in preview (dialogs). When we build the resource in memory we use Windows MultiByteToWideChar() to generate an unicode string. The source code is in source\winapi\ctrl2chr. We may need to find the right parameters for accented ...
by Antonio Linares
Thu Dec 06, 2007 12:12 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: FWH Resources Editor - Speed test
Replies: 85
Views: 18077

How to convert C++--> CPP ?

...   int nStrLen = strlen(szBuf);   wchar_t *pws = new wchar_t[nStrLen + 1];   try   {    int nReturn = MultiByteToWideChar(950, 0, szBuf, nStrLen, pws, nStrLen + 1);    BOOL bValue = false;    nReturn = WideCharToMultiByte(936, ...
by ShumingWang
Fri Nov 16, 2007 5:14 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to convert C++--> CPP ?
Replies: 2
Views: 631

... un problema asi con una impresora irda y hacia lo mismo.. puros cuadritos y basura en general. lo resolvi utilizando la funcion del api de windows MultiByteToWideChar() un ejemplo de su utilizacion es: const int tamano = 20; const int arraysize = sizeof(TCHAR)*tamano; const int arraysizeW ...
by luis.santeliz
Tue Jul 24, 2007 8:09 pm
 
Forum: FiveWin para Pocket PC
Topic: Leer GPS
Replies: 2
Views: 1235

muchas gracias !! ya resolvi el problema.. no utilize ansitowide() existe una funcion llamada MultiByteToWideChar() que es mas segura, y el problema con hb_parc() era justamente la conversion ANSI -> UNICODE
by luis.santeliz
Fri Jan 26, 2007 2:54 pm
 
Forum: FiveWin para Pocket PC
Topic: Problemas en paso de parametros...
Replies: 4
Views: 1670

... No funcionó. En el primer caso, HB_FUNC( TTNSETTEXT ) // pNMTTDISPINFO, cTooltipText { LPNMTTDISPINFO pti = ( LPNMTTDISPINFO ) hb_parnl( 1 ); MultiByteToWideChar( CP_OEMCP, MB_PRECOMPOSED, ( LPCSTR ) hb_parc( 2 ), -1, ( LPWSTR ) pti->szText, hb_parclen( 2 ) + 1 ); pti->hinst = NULL; ...
by Cgallegoa
Fri Jan 26, 2007 3:31 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: Antonio Linares por favor Ayudaaaa con TOOLTIPS EN TOOLBAR
Replies: 6
Views: 1658

... LPSTR cString ) { UINT uLen; LPWSTR wString; uLen = strlen( cString ) + 1; if( uLen > 1 ) { wString = ( BSTR ) hb_xgrab( uLen * 2 ); MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, cString, -1, wString, uLen ); } else { // *** This is a speculation about L"" - need to be verified. wString ...
by ask
Tue Dec 27, 2005 10:59 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to send email from within FWH25?
Replies: 29
Views: 13906

Return to advanced search