Sudip, Change .-
#pragma BEGINDUMP
#include "windows.h"
#include "hbapi.h"
HB_FUNC( CSAVEFILE )
{
OPENFILENAME ofn;
char File[ MAX_PATH ] = "";
char Filter[ MAX_PATH ] = "";
if ( ISCHAR( 1 ) )
lstrcpy( File, hb_parc( 1 ) );
if ( ISCHAR( 2 ) )
lstrcpy( Filter, hb_parc( 2 ) ) ;
ofn.lStructSize = 76;
With .-
#pragma BEGINDUMP
#include "windows.h"
#include "hbapi.h"
HB_FUNC( CSAVEFILE )
{
char File[ MAX_PATH ] = "";
char Filter[ MAX_PATH ] = "";
OPENFILENAME ofn;
ZeroMemory(&ofn, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
if ( ISCHAR( 1 ) )
lstrcpy( File, hb_parc( 1 ) );
if ( ISCHAR( 2 ) )
lstrcpy( Filter, hb_parc( 2 ) ) ;
// ofn.lStructSize = 76; Remark or delete line
And the same with COPENFILE, Change .-
HB_FUNC( COPENFILE )
{
OPENFILENAME ofn;
char File[ MAX_PATH ] = "";
char Filter[ MAX_PATH ] = "";
if ( ISCHAR( 1 ) )
lstrcpy( File, hb_parc( 1 ) );
if ( ISCHAR( 2 ) )
lstrcpy( Filter, hb_parc( 2 ) ) ;
ofn.lStructSize = 76;
With .-
HB_FUNC( COPENFILE )
{
char File[ MAX_PATH ] = "";
char Filter[ MAX_PATH ] = "";
OPENFILENAME ofn;
ZeroMemory(&ofn, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
if ( ISCHAR( 1 ) )
lstrcpy( File, hb_parc( 1 ) );
if ( ISCHAR( 2 ) )
lstrcpy( Filter, hb_parc( 2 ) ) ;
// ofn.lStructSize = 76; Remark or delete line
This runs OK with xHarbour+gtwvw+BCC ...
Not comment.
--
Xavi
P.S. Please don't send emails in HTML is better in text plain.
Sudip Bhattacharyya escribió:
Hello Xavi, Thanks for the "joke". I am not a very experienced user. I
don't know how to use the open or save file common dialog box. So, I
wrote 2 C functions from the code I received from xHarvour forum. My
xHarbour+gtwvw program runs OK. Now, I am in a process to transfer
xHarbour+gtwvw codes into Harbour+gtwvg, as help and development for
gtwvw are becoming limited now. > Sorry, it's a joke, remember that C
don't initialize anything eg nil. I used my functions with Harbour as
follows:- cZipFile := CSAVEFILE(alltrim(_accyrdir)+".zip", "Zip(*.zip)"
) This runs OK with xHarbour+gtwvw+BCC and Harbour+gtwvg+Mingw but shows
runtime errors with Harbour+gtwvg+BCC. As a student of Computer Science,
I want to know the cause. With best regards. Sudip
------------------------------------------------------------------------
View this message in context: Re: Different Behavior of BCC and Mingw
<http://www.nabble.com/Different-Behavior-of-BCC-and-Mingw-tp23799842p23805272.html>
Sent from the Harbour - Dev mailing list archive
<http://www.nabble.com/Harbour---Dev-f688.html> at Nabble.com.
------------------------------------------------------------------------
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour