From 4e922aa3b553f7d3df02f59d2179637b2121f182 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 15 Jul 2009 13:04:39 +0000 Subject: [PATCH] 2009-07-15 14:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * source/pp/Makefile - Removed HB_PPGEN_PATH setting. Now HB_BIN_COMPILE is used to point to the directory where all native executables are to be found. This means you can simply delete HB_PPGEN_PATH from your local settings. ; NOTE: Please update make_gnu_xmingw*.sh script accordingly, it should probably accept (detect) HB_BIN_COMPILE and drop HB_COMP_PATH / HB_PPGEN_PATH settings. Or, we should define some new ways to define cross builds replacing the current mess (there is also HB_XBUILD). I'd vote for these envvars: - HB_HOST_ARCH (linux, win, dos, os2, etc...) - HB_HOST_BIN (dir of native executables) - HB_HOST_BIN_EXT (.exe or empty) * INSTALL * Updated cross-build sections and deleted make_gnu_xmingw*.sh related exception to keep instructions clean. * contrib/hbwin/wapi_commctrl.c * contrib/hbwin/hbwapi.h ! Fixed to compile under various other win compilers. ! Added missing WinCE protections. (notice all tools are freely available to check these and avoid breaking builds) Added non-WinCE branch to return dummy values. ! Formatted: (_WIN32_IE >= 0x0300) -> ( _WIN32_IE >= 0x0300 ) ! Fixed non-ANSI comments. ! Fixed warnings, and there is still some dubious comversions in there like HANDLE - HTREEVIEW and RECT passings. I wonder if it is possible at all to create clean Windows API code. ; NOTE: Please take care of above stuff, it's not a pleasure to be the cleaner of such code, but it breaks builds to it must be done all the time. ; NOTE: I'd like to recommend adding only Windows API functions which are available on all Windows platforms (WinCE, Win64) otherwise it will be more difficult to build anything portable on top of them. ; QUESTION: Why many functions are disabled with #if 0? --- harbour/ChangeLog | 44 ++++++++- harbour/INSTALL | 30 ++---- harbour/contrib/hbwin/hbwapi.h | 36 +++---- harbour/contrib/hbwin/wapi_commctrl.c | 134 +++++++++++++++++++------- harbour/source/pp/Makefile | 6 +- 5 files changed, 167 insertions(+), 83 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c8b8282026..e45712f969 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,46 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-07-15 14:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * source/pp/Makefile + - Removed HB_PPGEN_PATH setting. Now HB_BIN_COMPILE is used to + point to the directory where all native executables are to be + found. This means you can simply delete HB_PPGEN_PATH from + your local settings. + ; NOTE: Please update make_gnu_xmingw*.sh script accordingly, + it should probably accept (detect) HB_BIN_COMPILE and + drop HB_COMP_PATH / HB_PPGEN_PATH settings. + Or, we should define some new ways to define cross + builds replacing the current mess (there is also + HB_XBUILD). I'd vote for these envvars: + - HB_HOST_ARCH (linux, win, dos, os2, etc...) + - HB_HOST_BIN (dir of native executables) + - HB_HOST_BIN_EXT (.exe or empty) + + * INSTALL + * Updated cross-build sections and deleted make_gnu_xmingw*.sh + related exception to keep instructions clean. + + * contrib/hbwin/wapi_commctrl.c + * contrib/hbwin/hbwapi.h + ! Fixed to compile under various other win compilers. + ! Added missing WinCE protections. (notice all tools are freely + available to check these and avoid breaking builds) + Added non-WinCE branch to return dummy values. + ! Formatted: (_WIN32_IE >= 0x0300) -> ( _WIN32_IE >= 0x0300 ) + ! Fixed non-ANSI comments. + ! Fixed warnings, and there is still some dubious comversions + in there like HANDLE - HTREEVIEW and RECT passings. I wonder + if it is possible at all to create clean Windows API code. + ; NOTE: Please take care of above stuff, it's not a pleasure + to be the cleaner of such code, but it breaks builds + to it must be done all the time. + ; NOTE: I'd like to recommend adding only Windows API functions + which are available on all Windows platforms (WinCE, + Win64) otherwise it will be more difficult to build + anything portable on top of them. + ; QUESTION: Why many functions are disabled with #if 0? + 2009-07-15 14:01 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/hpux/install.cf * config/darwin/install.cf @@ -58,8 +98,8 @@ settings and drop the former. ! Reverted prev cleanup. ; TOFIX: install rule for hbpp lib doesn't work after recent - change. - ; TODO: Delete HB_PPGEN_PATH + change. [REVERTED] + ; TODO: Delete HB_PPGEN_PATH. 2009-07-15 12:39 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/lib.cf diff --git a/harbour/INSTALL b/harbour/INSTALL index 110815523e..f9f4a5b40d 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -278,18 +278,17 @@ OPTIONS AVAILABLE WHEN BUILDING HARBOUR Cross building -------------- - when using make_gnu_xmingwce.sh: - HB_COMP_PATH=\bin\harbour.exe - HB_PPGEN_PATH=\bin\hbpp.exe - with rest of compilers: + Point this envvar to the directory where native Harbour executables for + your host platform can be found: HB_BIN_COMPILE=\bin - HB_PPGEN_PATH=\bin - You need these when building for a platform different than host. - For this to work, you will need to point above environment variables - to a native Harbour build available on your system. You don't need - a full native build, harbour, hbpp and hbmk2 executables are - enough for the process to succeed. + You need these when building for a platform different than host + (f.e. to create Windows builds on Linux, to create a Windows x64 + build on 32-bit Windows or to create Windows CE/ARM build on any + operating systems). For this to work, you will need to point + above environment variables to a native Harbour build available on + your system. You don't need a full native build, harbour, hbpp and + hbmk2 executables are enough for the process to succeed. EXAMPLES @@ -303,8 +302,6 @@ EXAMPLES Don't use spaces in dirs. - '%1 %2' can be empty, 'clean', 'install' or 'clean install' depending on what you want to do. - - Cross build setup (HB_BIN_COMPILE, HB_COMP_PATH, HB_PPGEN_PATH) - is tentative. --- MSVC 2008 + SDK set WindowsSDKDir=%ProgramFiles%\Microsoft SDKs\Windows\v6.0A\ @@ -327,7 +324,6 @@ EXAMPLES call "%ProgramFiles%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86_amd64 rem set HB_BIN_COMPILE=C:\hb-msvc\bin - set HB_PPGEN_PATH=%HB_BIN_COMPILE% rem set HB_COMPILER=msvc64 set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% @@ -372,7 +368,6 @@ EXAMPLES set PATH=C:\mingw64\bin;%PATH% rem set HB_BIN_COMPILE=C:\hb-mingw\bin - set HB_PPGEN_PATH=%HB_BIN_COMPILE% rem set HB_COMPILER=mingw64 set HB_CCPREFIX=x86_64-w64-mingw32- @@ -384,7 +379,6 @@ EXAMPLES set PATH=C:\mingwce\opt\mingw32ce\bin;C:\cygwin\bin;%PATH% rem set HB_BIN_COMPILE=C:\hb-mingw\bin - set HB_PPGEN_PATH=%HB_BIN_COMPILE% rem set HB_ARCHITECTURE=wce set HB_COMPILER=mingwarm @@ -424,7 +418,6 @@ EXAMPLES call "%ProgramFiles%\Intel\Compiler\C++\10.1.025\Itanium\Bin\iclvars.bat" rem set HB_BIN_COMPILE=C:\hb-icc\bin - set HB_PPGEN_PATH=%HB_BIN_COMPILE% rem set HB_COMPILER=iccia64 set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% @@ -455,7 +448,6 @@ EXAMPLES set LIB=%ProgramFiles%\PellesC\Lib;%ProgramFiles%\PellesC\Lib\Win64;%LIB% rem set HB_BIN_COMPILE=C:\hb-pocc\bin - set HB_PPGEN_PATH=%HB_BIN_COMPILE% rem set HB_COMPILER=pocc64 set HB_INSTALL_PREFIX=C:\hb-%HB_COMPILER% @@ -468,7 +460,6 @@ EXAMPLES set LIB=%ProgramFiles%\PellesC\Lib;%ProgramFiles%\PellesC\Lib\WinCE;%LIB% rem set HB_BIN_COMPILE=C:\hb-pocc\bin - set HB_PPGEN_PATH=%HB_BIN_COMPILE% rem set HB_ARCHITECTURE=wce set HB_COMPILER=poccarm @@ -601,7 +592,6 @@ EXAMPLES rem rem ; Native Windows Harbour binaries need to be installed on this path set HB_BIN_COMPILE=C:\hb-watcom\bin - set HB_PPGEN_PATH=%HB_BIN_COMPILE% rem set HB_ARCHITECTURE=os2 set HB_COMPILER=watcom @@ -620,7 +610,6 @@ EXAMPLES # ; eliminate libraries which scans for local host header files export HB_XBUILD=yes # ; Native Linux binaries need to be installed on this path - export HB_PPGEN_PATH="/tmp/cros-hb" export HB_BIN_COMPILE="/tmp/cros-hb" # ; export HB_ARCHITECTURE=os2 @@ -641,7 +630,6 @@ EXAMPLES rem rem ; Native Windows Harbour binaries need to be installed on this path set HB_BIN_COMPILE=C:\hb-watcom\bin - set HB_PPGEN_PATH=%HB_BIN_COMPILE% rem set HB_ARCHITECTURE=linux set HB_COMPILER=watcom diff --git a/harbour/contrib/hbwin/hbwapi.h b/harbour/contrib/hbwin/hbwapi.h index ba83c5d129..e6d9917dc8 100644 --- a/harbour/contrib/hbwin/hbwapi.h +++ b/harbour/contrib/hbwin/hbwapi.h @@ -53,24 +53,24 @@ #ifndef __HBWAPI_H #define __HBWAPI_H -#define wapi_par_WNDPROC( n ) ( ( WNDPROC ) hb_parptr( n ) ) -#define wapi_par_WPARAM( n ) ( ( WPARAM ) hb_parptr( n ) ) -#define wapi_par_LPARAM( n ) ( ( LPARAM ) hb_parptr( n ) ) -#define wapi_par_HWND( n ) ( ( HWND ) hb_parptr( n ) ) -#define wapi_par_HDC( n ) ( ( HDC ) hb_parptr( n ) ) -#define wapi_par_HANDLE( n ) ( ( HANDLE ) hb_parptr( n ) ) -#define wapi_par_HGDIOBJ( n ) ( ( HGDIOBJ ) hb_parptr( n ) ) -#define wapi_par_HBRUSH( n ) ( ( HBRUSH ) hb_parptr( n ) ) -#define wapi_par_HBITMAP( n ) ( ( HBITMAP ) hb_parptr( n ) ) -#define wapi_par_HICON( n ) ( ( HICON ) hb_parptr( n ) ) -#define wapi_par_HIMAGELIST( n ) ( ( HIMAGELIST ) hb_parptr( n ) ) -#define wapi_par_HFONT( n ) ( ( HFONT ) hb_parptr( n ) ) -#define wapi_par_HINSTANCE( n ) ( ( HINSTANCE ) hb_parptr( n ) ) -#define wapi_par_TREEITEM( n ) ( ( HTREEITEM ) hb_parptr( n ) ) -#define wapi_par_HITEM( n ) ( ( HTREEITEM ) hb_parptr( n ) ) -#define wapi_par_TVHITTESTINFO( n ) ( ( TVHITTESTINFO* ) hb_parptr( n ) ) -#define wapi_par_TVINSERTSTRUCT( n ) ( ( TVINSERTSTRUCT* ) hb_parptr( n ) ) -#define wapi_par_TVITEM( n ) ( ( TVITEM* ) hb_parptr( n ) ) +#define wapi_par_WNDPROC( n ) ( ( WNDPROC ) hb_parptr( n ) ) +#define wapi_par_WPARAM( n ) ( ( WPARAM ) hb_parptr( n ) ) +#define wapi_par_LPARAM( n ) ( ( LPARAM ) hb_parptr( n ) ) +#define wapi_par_HWND( n ) ( ( HWND ) hb_parptr( n ) ) +#define wapi_par_HDC( n ) ( ( HDC ) hb_parptr( n ) ) +#define wapi_par_HANDLE( n ) ( ( HANDLE ) hb_parptr( n ) ) +#define wapi_par_HGDIOBJ( n ) ( ( HGDIOBJ ) hb_parptr( n ) ) +#define wapi_par_HBRUSH( n ) ( ( HBRUSH ) hb_parptr( n ) ) +#define wapi_par_HBITMAP( n ) ( ( HBITMAP ) hb_parptr( n ) ) +#define wapi_par_HICON( n ) ( ( HICON ) hb_parptr( n ) ) +#define wapi_par_HIMAGELIST( n ) ( ( HIMAGELIST ) hb_parptr( n ) ) +#define wapi_par_HFONT( n ) ( ( HFONT ) hb_parptr( n ) ) +#define wapi_par_HINSTANCE( n ) ( ( HINSTANCE ) hb_parptr( n ) ) +#define wapi_par_TREEITEM( n ) ( ( HTREEITEM ) hb_parptr( n ) ) +#define wapi_par_HITEM( n ) ( ( HTREEITEM ) hb_parptr( n ) ) +#define wapi_par_TVHITTESTINFO( n ) ( ( TVHITTESTINFO * ) hb_parptr( n ) ) +#define wapi_par_TVINSERTSTRUCT( n ) ( ( TVINSERTSTRUCT * ) hb_parptr( n ) ) +#define wapi_par_TVITEM( n ) ( ( TVITEM* ) hb_parptr( n ) ) #define wapi_par_COLORREF( n ) ( ( COLORREF ) hb_parnint( n ) ) diff --git a/harbour/contrib/hbwin/wapi_commctrl.c b/harbour/contrib/hbwin/wapi_commctrl.c index 9609dfdfa6..8657dad208 100644 --- a/harbour/contrib/hbwin/wapi_commctrl.c +++ b/harbour/contrib/hbwin/wapi_commctrl.c @@ -108,7 +108,7 @@ HB_FUNC( WAPI_IMAGELIST_COCREATEINSTANCE ) /* BOOL ImageList_Copy( HIMAGELIST himlDst, int iDst, HIMAGELIST himlSrc, int iSrc, UINT uFlags ); */ -#if (_WIN32_IE >= 0x0300) +#if ( _WIN32_IE >= 0x0300 ) HB_FUNC( WAPI_IMAGELIST_COPY ) { wapi_ret_L( ImageList_Copy( wapi_par_HIMAGELIST( 1 ), @@ -216,7 +216,7 @@ HB_FUNC( WAPI_IMAGELIST_DRAWINDIRECT ) /* HIMAGELIST ImageList_Duplicate( HIMAGELIST himl ); */ -#if (_WIN32_IE >= 0x0400) +#if ( _WIN32_IE >= 0x0400 ) HB_FUNC( WAPI_IMAGELIST_DUPLICATE ) { wapi_ret_HANDLE( ImageList_Duplicate( wapi_par_HIMAGELIST( 1 ) ) ); @@ -430,7 +430,7 @@ HB_FUNC( WAPI_IMAGELIST_SETICONSIZE ) /* BOOL ImageList_SetImageCount( HIMAGELIST himl, UINT uNewCount ); */ -#if (_WIN32_IE >= 0x0400) +#if ( _WIN32_IE >= 0x0400 ) HB_FUNC( WAPI_IMAGELIST_SETIMAGECOUNT ) { wapi_ret_L( ImageList_SetImageCount( wapi_par_HIMAGELIST( 1 ), @@ -711,7 +711,7 @@ HB_FUNC( WAPI_TABCTRL_DESELECTALL ) } /*----------------------------------------------------------------------*/ -#if (_WIN32_IE >= 0x0400) +#if ( _WIN32_IE >= 0x0400 ) /* TabCtrl_HighlightItem(hwnd, i, fHighlight) */ /* (BOOL)SNDMSG((hwnd), TCM_HIGHLIGHTITEM, (WPARAM)(i), (LPARAM)MAKELONG (fHighlight, 0)) */ @@ -848,13 +848,17 @@ HB_FUNC( WAPI_TREEVIEW_EXPAND ) */ HB_FUNC( WAPI_TREEVIEW_GETBKCOLOR ) { +#if ! defined( HB_OS_WIN_CE ) && ! defined( __MINGW32__ ) wapi_ret_COLORREF( TreeView_GetBkColor( wapi_par_HWND( 1 ) ) ); +#else + wapi_ret_COLORREF( 0 ); +#endif } /*----------------------------------------------------------------------*/ /* IE 5.0 ...UINT TreeView_GetCheckState( HWND hwndTV, HTREEITEM hItem ); */ -#if (_WIN32_IE >= 0x0500) +#if ( _WIN32_IE >= 0x0500 ) HB_FUNC( WAPI_TREEVIEW_GETCHECKSTATE ) { wapi_ret_UINT( TreeView_GetCheckState( wapi_par_HWND( 1 ), wapi_par_HANDLE( 2 ) ) ); @@ -930,10 +934,14 @@ HB_FUNC( WAPI_TREEVIEW_GETINDENT ) /* IE 4.0 ... COLORREF TreeView_GetInsertMarkColor( HWND hwndTV ); */ -#if (_WIN32_IE >= 0x0400) +#if ( _WIN32_IE >= 0x0400 ) HB_FUNC( WAPI_TREEVIEW_GETINSERTMARKCOLOR ) { +#if ! defined( HB_OS_WIN_CE ) wapi_ret_COLORREF( TreeView_GetInsertMarkColor( wapi_par_HWND( 1 ) ) ); +#else + wapi_ret_COLORREF( 0 ); +#endif } #endif /*----------------------------------------------------------------------*/ @@ -942,28 +950,30 @@ HB_FUNC( WAPI_TREEVIEW_GETINSERTMARKCOLOR ) */ HB_FUNC( WAPI_TREEVIEW_GETISEARCHSTRING ) { - //wapi_ret_( TreeView_GetISearchString( wapi_par_HWND( 1 ), LPTSTR ) ); + /* wapi_ret_( TreeView_GetISearchString( wapi_par_HWND( 1 ), LPTSTR ) ); */ } /*----------------------------------------------------------------------*/ /* ...BOOL TreeView_GetItem( HWND hwndTV, LPTVITEM pitem ); - -- Version 4.71 or later -- - -BOOL TreeView_GetItem( HWND hwndTV, LPTVITEMEX pitem ); +...BOOL TreeView_GetItem( HWND hwndTV, LPTVITEMEX pitem ); */ HB_FUNC( WAPI_TREEVIEW_GETITEM ) { - //wapi_ret_( TreeView_GetItem( wapi_par_HWND( 1 ), LPTVITEM ) ); + /* wapi_ret_( TreeView_GetItem( wapi_par_HWND( 1 ), LPTVITEM ) ); */ } /*----------------------------------------------------------------------*/ /* IE 4.0 ...int TreeView_GetItemHeight( HWND hwndTV ); */ -#if (_WIN32_IE >= 0x0400) +#if ( _WIN32_IE >= 0x0400 ) HB_FUNC( WAPI_TREEVIEW_GETITEMHEIGHT ) { +#if ! defined( HB_OS_WIN_CE ) wapi_ret_NI( TreeView_GetItemHeight( wapi_par_HWND( 1 ) ) ); +#else + wapi_ret_NI( 0 ); +#endif } #endif /*----------------------------------------------------------------------*/ @@ -973,10 +983,10 @@ HB_FUNC( WAPI_TREEVIEW_GETITEMHEIGHT ) */ HB_FUNC( WAPI_TREEVIEW_GETITEMPARTRECT ) { - RECT *prc; - TVITEMPART *partid; + RECT rc; + TVITEMPART partid; - wapi_ret_L( TreeView_GetItemPartRect( wapi_par_HWND( 1 ),, wapi_par_HANDLE( 2 ), &prc, &partid ) ); + wapi_ret_L( TreeView_GetItemPartRect( wapi_par_HWND( 1 ),, wapi_par_HANDLE( 2 ), &rc, &partid ) ); } #endif /*----------------------------------------------------------------------*/ @@ -985,34 +995,38 @@ HB_FUNC( WAPI_TREEVIEW_GETITEMPARTRECT ) */ HB_FUNC( WAPI_TREEVIEW_GETITEMRECT ) { - LPRECT prc; - wapi_ret_L( TreeView_GetItemRect( wapi_par_HWND( 1 ), wapi_par_HANDLE( 2 ), &prc, wapi_par_BOOL( 4 ) ) ); + LPRECT prc = NULL; + wapi_ret_L( TreeView_GetItemRect( wapi_par_HWND( 1 ), ( HTREEITEM ) wapi_par_HANDLE( 2 ), prc, wapi_par_BOOL( 4 ) ) ); } /*----------------------------------------------------------------------*/ /* IE 5.0 ...UINT TreeView_GetItemState( HWND hwndTV, HTREEITEM hItem, UINT stateMask ); */ -#if (_WIN32_IE >= 0x0500) +#if ( _WIN32_IE >= 0x0500 ) HB_FUNC( WAPI_TREEVIEW_GETITEMSTATE ) { - wapi_ret_UINT( TreeView_GetItemState( wapi_par_HWND( 1 ), wapi_par_HANDLE( 2 ), wapi_par_UINT( 3 ) ) ); + wapi_ret_UINT( TreeView_GetItemState( wapi_par_HWND( 1 ), ( HTREEITEM ) wapi_par_HANDLE( 2 ), wapi_par_UINT( 3 ) ) ); } #endif /*----------------------------------------------------------------------*/ /* IE 4.0 ...HTREEITEM TreeView_GetLastVisible( HWND hwndTV ); */ -#if (_WIN32_IE >= 0x0400) +#if ( _WIN32_IE >= 0x0400 ) HB_FUNC( WAPI_TREEVIEW_GETLASTVISIBLE ) { +#if ! defined( HB_OS_WIN_CE ) wapi_ret_HANDLE( TreeView_GetLastVisible( wapi_par_HWND( 1 ) ) ); +#else + wapi_ret_HANDLE( NULL ); +#endif } #endif /*----------------------------------------------------------------------*/ /* ...COLOREF TreeView_GetLineColor( HWND hwndTV ); */ -#if (_WIN32_IE >= 0x0500) +#if ( _WIN32_IE >= 0x0500 ) HB_FUNC( WAPI_TREEVIEW_GETLINECOLOR ) { wapi_ret_COLORREF( TreeView_GetLineColor( wapi_par_HWND( 1 ) ) ); @@ -1091,7 +1105,11 @@ HB_FUNC( WAPI_TREEVIEW_GETROOT ) */ HB_FUNC( WAPI_TREEVIEW_GETSCROLLTIME ) { +#if ! defined( HB_OS_WIN_CE ) && ! defined( __MINGW32__ ) wapi_ret_UINT( TreeView_GetScrollTime( wapi_par_HWND( 1 ) ) ); +#else + wapi_ret_UINT( 0 ); +#endif } /*----------------------------------------------------------------------*/ /* @@ -1105,20 +1123,28 @@ HB_FUNC( WAPI_TREEVIEW_GETSELECTION ) /* ...COLORREF TreeView_GetTextColor( HWND hwndTV ); */ -#if (_WIN32_IE >= 0x0400) +#if ( _WIN32_IE >= 0x0400 ) HB_FUNC( WAPI_TREEVIEW_GETTEXTCOLOR ) { +#if ! defined( HB_OS_WIN_CE ) wapi_ret_COLORREF( TreeView_GetTextColor( wapi_par_HWND( 1 ) ) ); +#else + wapi_ret_COLORREF( 0 ); +#endif } #endif /*----------------------------------------------------------------------*/ /* ...HWND TreeView_GetToolTips( HWND hwndTV ); */ -#if (_WIN32_IE >= 0x0300) +#if ( _WIN32_IE >= 0x0300 ) HB_FUNC( WAPI_TREEVIEW_GETTOOLTIPS ) { +#if ! defined( HB_OS_WIN_CE ) wapi_ret_HANDLE( TreeView_GetToolTips( wapi_par_HWND( 1 ) ) ); +#else + wapi_ret_HANDLE( NULL ); +#endif } #endif /*----------------------------------------------------------------------*/ @@ -1127,7 +1153,11 @@ HB_FUNC( WAPI_TREEVIEW_GETTOOLTIPS ) */ HB_FUNC( WAPI_TREEVIEW_GETUNICODEFORMAT ) { +#if ! defined( HB_OS_WIN_CE ) && ! defined( __MINGW32__ ) wapi_ret_L( TreeView_GetUnicodeFormat( wapi_par_HWND( 1 ) ) ); +#else + wapi_ret_L( FALSE ); +#endif } /*----------------------------------------------------------------------*/ /* @@ -1219,20 +1249,24 @@ HB_FUNC( WAPI_TREEVIEW_SETAUTOSCROLLINFO ) /* ...COLORREF TreeView_SetBkColor( HWND hwndTV, COLORREF clrBk ); */ -#if (_WIN32_IE >= 0x0400) +#if ( _WIN32_IE >= 0x0400 ) HB_FUNC( WAPI_TREEVIEW_SETBKCOLOR ) { +#if ! defined( HB_OS_WIN_CE ) wapi_ret_COLORREF( TreeView_SetBkColor( wapi_par_HWND( 1 ), wapi_par_COLORREF( 2 ) ) ); +#else + wapi_ret_COLORREF( 0 ); +#endif } #endif /*----------------------------------------------------------------------*/ /* ...UINT TreeView_SetCheckState( HWND hwndTV, HTREEITEM hItem, BOOL fCheck ); */ -#if (_WIN32_IE >= 0x0500) +#if ( _WIN32_IE >= 0x0500 ) HB_FUNC( WAPI_TREEVIEW_SETCHECKSTATE ) { - // wapi_ret_UINT( TreeView_SetCheckState( wapi_par_HWND( 1 ), wapi_par_HANDLE( 2 ), wapi_par_BOOL( 3 ) ) ); + /* wapi_ret_UINT( TreeView_SetCheckState( wapi_par_HWND( 1 ), wapi_par_HANDLE( 2 ), wapi_par_BOOL( 3 ) ) ); */ } #endif /*----------------------------------------------------------------------*/ @@ -1266,29 +1300,35 @@ HB_FUNC( WAPI_TREEVIEW_SETINDENT ) ...BOOL TreeView_SetInsertMark( HWND hwndTV, HTREEITEM htiInsert, BOOL fAfter ); */ -#if (_WIN32_IE >= 0x0400) +#if ( _WIN32_IE >= 0x0400 ) HB_FUNC( WAPI_TREEVIEW_SETINSERTMARK ) { +#if ! defined( HB_OS_WIN_CE ) wapi_ret_L( TreeView_SetInsertMark( wapi_par_HWND( 1 ), wapi_par_HANDLE( 2 ), wapi_par_BOOL( 3 ) ) ); +#else + wapi_ret_L( FALSE ); +#endif } #endif /*----------------------------------------------------------------------*/ /* ...COLORREF TreeView_SetInsertMarkColor( HWND hwndTV, COLORREF clrInsertMark ); */ -#if (_WIN32_IE >= 0x0400) +#if ( _WIN32_IE >= 0x0400 ) HB_FUNC( WAPI_TREEVIEW_SETINSERTMARKCOLOR ) { +#if ! defined( HB_OS_WIN_CE ) wapi_ret_COLORREF( TreeView_SetInsertMarkColor( wapi_par_HWND( 1 ), wapi_par_COLORREF( 2 ) ) ); +#else + wapi_ret_COLORREF( 0 ); +#endif } #endif /*----------------------------------------------------------------------*/ /* ...BOOL TreeView_SetItem( HWND hwndTV, LPTVITEM pitem ); - - Version 4.71 or later - - -BOOL TreeView_SetItem( HWND hwndTV, LPTVITEMEX pitem ); +...BOOL TreeView_SetItem( HWND hwndTV, LPTVITEMEX pitem ); */ HB_FUNC( WAPI_TREEVIEW_SETITEM ) { @@ -1298,27 +1338,31 @@ HB_FUNC( WAPI_TREEVIEW_SETITEM ) /* ...int TreeView_SetItemHeight( HWND hwndTV, SHORT cyItem ); */ -#if (_WIN32_IE >= 0x0400) +#if ( _WIN32_IE >= 0x0400 ) HB_FUNC( WAPI_TREEVIEW_SETITEMHEIGHT ) { +#if ! defined( HB_OS_WIN_CE ) wapi_ret_NI( TreeView_SetItemHeight( wapi_par_HWND( 1 ), wapi_par_SHORT( 2 ) ) ); +#else + wapi_ret_NI( 0 ); +#endif } #endif /*----------------------------------------------------------------------*/ /* ...UINT TreeView_SetItemState( HWND hwndTV, HTREEITEM hItem, UINT state, UINT stateMask ); */ -#if (_WIN32_IE >= 0x0500) +#if ( _WIN32_IE >= 0x0500 ) HB_FUNC( WAPI_TREEVIEW_SETITEMSTATE ) { - // wapi_ret_UINT( TreeView_SetItemState( wapi_par_HWND( 1 ), wapi_par_HANDLE( 2 ), wapi_par_UINT( 3 ), wapi_par_UINT( 4 ) ) ); + /* wapi_ret_UINT( TreeView_SetItemState( wapi_par_HWND( 1 ), wapi_par_HANDLE( 2 ), wapi_par_UINT( 3 ), wapi_par_UINT( 4 ) ) ); */ } #endif /*----------------------------------------------------------------------*/ /* ...COLORREF TreeView_SetLineColor( HWND hwndTV, COLORREF clrLine ); */ -#if (_WIN32_IE >= 0x0500) +#if ( _WIN32_IE >= 0x0500 ) HB_FUNC( WAPI_TREEVIEW_SETLINECOLOR ) { wapi_ret_COLORREF( TreeView_SetLineColor( wapi_par_HWND( 1 ), wapi_par_COLORREF( 2 ) ) ); @@ -1330,26 +1374,38 @@ HB_FUNC( WAPI_TREEVIEW_SETLINECOLOR ) */ HB_FUNC( WAPI_TREEVIEW_SETSCROLLTIME ) { +#if ! defined( HB_OS_WIN_CE ) && ! defined( __MINGW32__ ) wapi_ret_UINT( TreeView_SetScrollTime( wapi_par_HWND( 1 ), wapi_par_UINT( 2 ) ) ); +#else + wapi_ret_UINT( 0 ); +#endif } /*----------------------------------------------------------------------*/ /* ...COLORREF TreeView_SetTextColor( HWND hwndTV, COLORREF clrText ); */ -#if (_WIN32_IE >= 0x0400) +#if ( _WIN32_IE >= 0x0400 ) HB_FUNC( WAPI_TREEVIEW_SETTEXTCOLOR ) { +#if ! defined( HB_OS_WIN_CE ) wapi_ret_COLORREF( TreeView_SetTextColor( wapi_par_HWND( 1 ), wapi_par_COLORREF( 2 ) ) ); +#else + wapi_ret_COLORREF( 0 ); +#endif } #endif /*----------------------------------------------------------------------*/ /* ...HWND TreeView_SetToolTips( HWND hwndTV, HWND hwndTooltip ); */ -#if (_WIN32_IE >= 0x0300) +#if ( _WIN32_IE >= 0x0300 ) HB_FUNC( WAPI_TREEVIEW_SETTOOLTIPS ) { +#if ! defined( HB_OS_WIN_CE ) wapi_ret_HANDLE( TreeView_SetToolTips( wapi_par_HWND( 1 ), wapi_par_HWND( 2 ) ) ); +#else + wapi_ret_HANDLE( NULL ); +#endif } #endif /*----------------------------------------------------------------------*/ @@ -1358,7 +1414,11 @@ HB_FUNC( WAPI_TREEVIEW_SETTOOLTIPS ) */ HB_FUNC( WAPI_TREEVIEW_SETUNICODEFORMAT ) { +#if ! defined( HB_OS_WIN_CE ) && ! defined( __MINGW32__ ) wapi_ret_L( TreeView_SetUnicodeFormat( wapi_par_HWND( 1 ), wapi_par_BOOL( 2 ) ) ); +#else + wapi_ret_L( FALSE ); +#endif } /*----------------------------------------------------------------------*/ #if 0 diff --git a/harbour/source/pp/Makefile b/harbour/source/pp/Makefile index a562e12884..9b31172778 100644 --- a/harbour/source/pp/Makefile +++ b/harbour/source/pp/Makefile @@ -19,10 +19,6 @@ LIBS=\ include $(TOP)$(ROOT)config/lib.cf -ifeq ($(HB_PPGEN_PATH),) - HB_PPGEN_PATH=$(EXE_DIR) -endif - INSTALL_RULE_LIBRARIES := $(INSTALL_RULE) HB_VERHEADER=$(TOP)$(ROOT)include/hbverbld.h @@ -33,7 +29,7 @@ pptable.c : $(HB_PP_RULES) $(CP) $(subst /,$(DIRSEP),$<) $@ else pptable.c : hbpp$(EXE_EXT) - $(HB_PPGEN_PATH)/hbpp$(EXE_EXT) $(TOP)$(ROOT)include/hbstdgen.ch -opptable.c -q -c -v$(HB_VERHEADER) + $(HB_BIN_COMPILE)/hbpp$(EXE_EXT) $(TOP)$(ROOT)include/hbstdgen.ch -opptable.c -q -c -v$(HB_VERHEADER) endif ifneq ($(HB_BIN_INSTALL),)