Use SysRefresh() in c code

Use SysRefresh() in c code

Postby cly166 » Tue Nov 09, 2010 8:29 am

May someone tell me how to call SysRefresh() in c code ?
i tried to put following command before calling it(refer winexec.c ), but not successfull.
*------------------------------------
BOOL SysRefresh( void );
or
extern BOOL SysRefresh( void );
*----------------------------------------------
code example :(unresolved external symbol "int __cdecl SysRefresh(void) on compiling)
*------------------------------------------------------
func Main()
? BBB()
? CCC()
retu nil

#pragma BEGINDUMP
BOOL SysRefresh( void );
// extern BOOL SysRefresh( void ); // same result of "(unresolved external symbol "int __cdecl SysRefresh(void))"

HB_FUNC( BBB )
{
SysRefresh();
hb_retc( "BBB" );
}

HB_FUNC( CCC )
{
hb_retc( "CCC" );
SysRefresh();
}
#pragma ENDDUMP
cly166
 
Posts: 11
Joined: Sat Sep 25, 2010 2:36 pm

Re: Use SysRefresh() in c code

Postby Enrico Maria Giordano » Tue Nov 09, 2010 3:43 pm

Your sample works fine here.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Use SysRefresh() in c code

Postby cly166 » Wed Nov 10, 2010 6:27 am

Do you use Borland C ?
i got same error in hHarbour and xHarbour with MSVC compiling.
May you tell me compling flags if you use MSVC also ?
Thanks and Regards
cly
cly166
 
Posts: 11
Joined: Sat Sep 25, 2010 2:36 pm

Re: Use SysRefresh() in c code

Postby Enrico Maria Giordano » Wed Nov 10, 2010 8:34 am

cly166 wrote:Do you use Borland C ?


Yes.

cly166 wrote:i got same error in hHarbour and xHarbour with MSVC compiling.
May you tell me compling flags if you use MSVC also ?


I'm not familiar with MSVC, sorry.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Use SysRefresh() in c code

Postby Antonio Linares » Wed Nov 10, 2010 9:35 am

Cly,

What FWH version are you using ?

You can check it inside FWH\include\FiveWin.ch

In case that you are using C++ mode, try this declaration:
Code: Select all  Expand view

// BOOL SysRefresh( void );

extern "C" {
   BOOL SysRefresh( void );
};
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Use SysRefresh() in c code

Postby cly166 » Wed Nov 10, 2010 1:35 pm

Antonio:
Thank you, it works.
i use FWH August, 2010
cly
cly166
 
Posts: 11
Joined: Sat Sep 25, 2010 2:36 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 98 guests