On Wed, 25 Mar 2009, vszak...@users.sourceforge.net wrote: Hi,
> * contrib/gtwvg/gtwvg.h > * contrib/gtwvg/wvggui.h > ! Fixed to _not_ override _WIN32_IE. Overriding these version > numbers is generally a very bad idea. Instead the code should > adapt to whatever values are defined by system headers. > This fixes most mingw64 errors. Please test other compilers. Many compilers does not set _WIN32_IE macro at all leaving the decision to programmers. If this macro will not be defined to at least 0x0300 then most of gtwvg code will not be usable. So it has to be defined and it should be done before including windows header files otherwise user will have to add it to CFLAGS. In practice it means that sth like: #ifndef _WIN32_IE #define _WIN32_IE 0x0400 #endif should be added before any #include. It can be added to gtwvg.h and #include "gtwvg.h" should be included as 1-st file in all .c files using it. The same should be done in all other files which use extended WinAPI functionality. The default setting can be improved using some information from machine type, f.e. Win64 builds for sure cannot be run with some older windows version, f.e.: #ifndef _WIN32_IE #ifdef _WIN64 #define _WIN32_IE 0x0501 #else #define _WIN32_IE 0x0400 #endif #endif It should also help to test the code for compilation with other versions. Pritpal should decide about default value he needs for basic functionality. User can overwrite it using HB_USER_CFLAGS. For tests we can try to compile the code with different settings, f.e: HB_USER_CFLAGS=-D_WIN32_IE=0x0200 or: HB_USER_CFLAGS=-D_WIN32_IE=0x0300 but please remember that not all compiler properly use _WIN32_IE macro to hide some definitions so such tests should be done with different C compilers. BTW: in hbsetup.h you added: ( defined(__POCC_TARGET__) && __POCC_TARGET__ == 2 ) to detect HB_OS_WIN_CE builds. Maybe it's documented method in POCC and in such case should be left but if not then I suggest to rather use sth like: ( defined( HB_OS_WIN ) && defined( _M_ARM ) ) best regards, Przemek ps. with current code MinGW32 and MinGW32CE builds fails with: ../../gtwvg.c: In function 'hb_wvt_gtCreateToolTipWindow': ../../gtwvg.c:4379: error: 'INITCOMMONCONTROLSEX' undeclared (first use in this function) ../../gtwvg.c:4379: error: (Each undeclared identifier is reported only once ../../gtwvg.c:4379: error: for each function it appears in.) ../../gtwvg.c:4379: error: expected ';' before 'icex' ../../gtwvg.c:4384: error: 'icex' undeclared (first use in this function) ../../gtwvg.c:4387: warning: implicit declaration of function 'InitCommonControlsEx' _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour