Some C help

Some C help

Postby AlexSchaft » Mon Feb 20, 2006 12:28 pm

How could I change:

Code: Select all  Expand view  RUN
   hTheme = OpenThemeData(hWnd, L"COMBOBOX");



to

Code: Select all  Expand view  RUN
   hTheme = OpenThemeData(hWnd, L_parc(3);


Compiler does not like it...

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

Code: Select all  Expand view  RUN
   char *cStyle =   ( ISCHAR(4) ? _parc( 4 ) : "COMBOBOX" );
   hTheme = OpenThemeData(hWnd, (unsigned short * ) cStyle);


This is the OpenThemeData definition:

Code: Select all  Expand view  RUN
THEMEAPI_(HTHEME) OpenThemeData(HWND,LPCWSTR);
User avatar
AlexSchaft
 
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Postby Antonio Linares » Mon Feb 20, 2006 1:14 pm

Alex,

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

Code: Select all  Expand view  RUN
   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
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

AnsitoWide

Postby AlexSchaft » Mon Feb 20, 2006 1:39 pm

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

Postby AlexSchaft » Mon Feb 20, 2006 1:44 pm

Hi,

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

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 86 guests