FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Some C help
Posts: 172
Joined: Fri Oct 07, 2005 01:29 PM
Some C help
Posted: Mon Feb 20, 2006 12:28 PM
How could I change:

   hTheme = OpenThemeData(hWnd, L"COMBOBOX");



to

   hTheme = OpenThemeData(hWnd, L_parc(3);


Compiler does not like it...

The following compiles, but I don't get anything drawn:

   char *cStyle =   ( ISCHAR(4) ? _parc( 4 ) : "COMBOBOX" );
   hTheme = OpenThemeData(hWnd, (unsigned short * ) cStyle);


This is the OpenThemeData definition:

THEMEAPI_(HTHEME) OpenThemeData(HWND,LPCWSTR);
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Some C help
Posted: Mon Feb 20, 2006 01:14 PM
Alex,

hTheme = OpenThemeData(hWnd, L"COMBOBOX");

   LPWSTR AnsiToWide( char * );
 
   ...

   LPWSTR pW = AnsiToWide( hb_parc( 3 ) );

   hTheme = OpenThemeData( hWnd, pW );
   hb_xfree( pW );
   ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 172
Joined: Fri Oct 07, 2005 01:29 PM
AnsitoWide
Posted: Mon Feb 20, 2006 01:39 PM

Thanks for the help, but I can't seem to find AnsiToWide in a C Lib? Getting an unresolved external.

Posts: 172
Joined: Fri Oct 07, 2005 01:29 PM
Found it
Posted: Mon Feb 20, 2006 01:44 PM

Hi,

Found AnsiToWide in a prg file inside xharbour, but something is still going wrong (not drawing). I'll keep looking.

Alex

Continue the discussion