Some C help

Post Reply
User avatar
AlexSchaft
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Some C help

Post 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);
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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 );
   ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
AlexSchaft
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

AnsitoWide

Post by AlexSchaft »

Thanks for the help, but I can't seem to find AnsiToWide in a C Lib? Getting an unresolved external.
User avatar
AlexSchaft
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Found it

Post by AlexSchaft »

Hi,

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

Alex
Post Reply