Page 1 of 1

Some C help

Posted: Mon Feb 20, 2006 12:28 pm
by AlexSchaft
How could I change:

Code: Select all

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

to

Code: Select all

   hTheme = OpenThemeData(hWnd, L_parc(3);
Compiler does not like it...

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

Code: Select all

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

Code: Select all

THEMEAPI_(HTHEME) OpenThemeData(HWND,LPCWSTR);

Posted: Mon Feb 20, 2006 1:14 pm
by Antonio Linares
Alex,

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

Code: Select all

   LPWSTR AnsiToWide( char * );
 
   ...

   LPWSTR pW = AnsiToWide( hb_parc( 3 ) );

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

AnsitoWide

Posted: Mon Feb 20, 2006 1:39 pm
by AlexSchaft
Thanks for the help, but I can't seem to find AnsiToWide in a C Lib? Getting an unresolved external.

Found it

Posted: Mon Feb 20, 2006 1:44 pm
by AlexSchaft
Hi,

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

Alex