Page 1 of 1

FWHarb.h

PostPosted: Tue Feb 14, 2006 3:03 pm
by E. Bartzokas
Antonio,

The above file in \FWH\INCLUDE, misses a CRLF at its end.
(At least until Jan FWH)
Can you please correct it for the next downloads.

Thanks
Evans

PostPosted: Tue Feb 14, 2006 3:38 pm
by Antonio Linares
Evans,

What error do you get caused by the missing CRLF ?

PostPosted: Tue Feb 14, 2006 10:58 pm
by E. Bartzokas
Antonio Linares wrote:Evans,

What error do you get caused by the missing CRLF ?


XLink: Missing CRLF at end of file.

I have already corrected my file...
I just want to tell you to add a CRLF at the of the file. Thanks for the attention...

By the way... I downloaded FWH Feb 2006 release, and the file
CGETDLGIT.C does not contain the changes that I've sent you.
This file is responsible for errors when trying to redefine control ID's with a negative ID number e.g. -1, thus before this code, if I tried to REDEFINE ID -1 OF oDlg COLOR CLR_BLUE, CLR_YELLOW. I got an Indefined ID -1 error and program crashed.

Here's the file again...

Code: Select all  Expand view

// CGETDLGIT.C

#include <WinTen.h>
#include <Windows.h>
#include <ClipApi.h>
#include <stdlib.h>


//----------------------------------------------------------------------------//
#ifndef __HARBOUR__
    CLIPPER GETDLGITEM( PARAMS ) // ( hDlg, nCtlId ) --> hControl
#else
    HARBOUR HB_FUN_GETDLGITEM( PARAMS )
#endif 
{
   _retnl( ( LONG ) GetDlgItem( ( HWND ) _parnl( 1 ), ( WORD ) _parni( 2 ) ) );
}

//----------------------------------------------------------------------------//
#ifndef __HARBOUR__
    CLIPPER NEXTDLGTAB( PARAMS ) // ( hDlg, hCtrl, lPrevious ) --> hControl
#else   
   HARBOUR HB_FUN_NEXTDLGTAB( PARAMS )
#endif
{
   _retnl( ( LONG ) GetNextDlgTabItem( ( HWND ) _parnl( 1 ), ( HWND ) _parnl( 2 ),
                                       _parl( 3 ) ) );
}

//----------------------------------------------------------------------------//
#ifndef __HARBOUR__
    CLIPPER GETCTRLID( PARAMS ) // hCtrl --> nId
#else
   HARBOUR HB_FUN_GETCTRLID( PARAMS )
#endif
{
   _retni( GetDlgCtrlID( ( HWND ) _parnl( 1 ) ) );
}

//----------------------------------------------------------------------------//



PostPosted: Wed Feb 15, 2006 12:18 am
by Antonio Linares
Evans,

The name of the file is GETDLGIT.C and it contains (besides two more functions):

Code: Select all  Expand view
CLIPPER GETDLGITEM( PARAMS ) // ( hDlg, nCtlId ) --> hControl
{
    // keep ( WORD ) _parni( 2 ) as the second parameter to support negative IDs
   _retnl( ( LONG ) GetDlgItem( ( HWND ) _parnl( 1 ), ( WORD ) _parni( 2 ) ) );
}


Please check that you are reviewing the right file. Thanks,