From 2e28a8c3e240db5dee9fda69be810658b1e2c62f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 13 Mar 2009 01:10:56 +0000 Subject: [PATCH] 2009-03-13 01:45 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * contrib/hbwin/wapi_commctrl.c * contrib/hbwin/wapi_winuser.c ! Lots of non-ANSI C comments converted to ANSI. (may I please ask to pay attention to this?) ! Fixed WAPI_GETSCROLLRANGE() return value. ! non-WinCE compatible functions converted to stubs when compiled for WinCE. * Formatting. * contrib/Makefile - contrib/hbgf + contrib/examples/hbgf * contrib/examples/hbgf/hbgfwin/Makefile * contrib/examples/hbgf/hbgfos2/Makefile * contrib/examples/hbgf/hbgfgtk/Makefile * contrib/examples/hbgf/Makefile * hbgf moved from contrib to examples. * contrib/examples/Makefile * Updated. --- harbour/ChangeLog | 22 ++ harbour/contrib/Makefile | 1 - harbour/contrib/examples/Makefile | 2 + harbour/contrib/{ => examples}/hbgf/Makefile | 2 +- .../{ => examples}/hbgf/hbgfgtk/Makefile | 2 +- .../{ => examples}/hbgf/hbgfgtk/button.prg | 0 .../{ => examples}/hbgf/hbgfgtk/creabutt.c | 0 .../{ => examples}/hbgf/hbgfgtk/creamenu.c | 0 .../{ => examples}/hbgf/hbgfgtk/creawin.c | 0 .../{ => examples}/hbgf/hbgfgtk/dispatch.c | 0 .../{ => examples}/hbgf/hbgfgtk/form.prg | 0 .../{ => examples}/hbgf/hbgfgtk/general.c | 0 .../{ => examples}/hbgf/hbgfgtk/harbgtk.ch | 0 .../{ => examples}/hbgf/hbgfgtk/harbgtk.h | 0 .../{ => examples}/hbgf/hbgfgtk/mainlgtk.c | 0 .../{ => examples}/hbgf/hbgfgtk/menu.prg | 0 .../{ => examples}/hbgf/hbgfgtk/menuitem.prg | 0 .../{ => examples}/hbgf/hbgfgtk/msginfo.c | 0 .../{ => examples}/hbgf/hbgfgtk/shared.ch | 0 .../{ => examples}/hbgf/hbgfgtk/winctrl.prg | 0 .../{ => examples}/hbgf/hbgfos2/Makefile | 2 +- .../{ => examples}/hbgf/hbgfos2/button.prg | 0 .../{ => examples}/hbgf/hbgfos2/edit.prg | 0 .../{ => examples}/hbgf/hbgfos2/os2pm.c | 0 .../{ => examples}/hbgf/hbgfos2/os2pm.ch | 0 .../{ => examples}/hbgf/hbgfos2/tform.prg | 0 .../{ => examples}/hbgf/hbgfos2/tmenu.prg | 0 .../{ => examples}/hbgf/hbgfos2/tmenuit.prg | 0 .../{ => examples}/hbgf/hbgfos2/winctrl.prg | 0 .../{ => examples}/hbgf/hbgfwin/Makefile | 2 +- .../{ => examples}/hbgf/hbgfwin/button.prg | 0 .../{ => examples}/hbgf/hbgfwin/edit.prg | 0 .../{ => examples}/hbgf/hbgfwin/form.prg | 0 .../{ => examples}/hbgf/hbgfwin/hbgfwin.ch | 0 .../{ => examples}/hbgf/hbgfwin/menu.prg | 0 .../{ => examples}/hbgf/hbgfwin/menuitem.prg | 0 .../{ => examples}/hbgf/hbgfwin/winapi.c | 0 .../{ => examples}/hbgf/hbgfwin/winctrl.prg | 0 .../{ => examples}/hbgf/tests/form2.prg | 0 .../{ => examples}/hbgf/tests/form3.hbf | 0 .../{ => examples}/hbgf/tests/form3.prg | 0 .../{ => examples}/hbgf/tests/form3res.prg | 0 .../{ => examples}/hbgf/tests/formtext.prg | 0 .../{ => examples}/hbgf/tests/hbgf.hbp | 0 .../{ => examples}/hbgf/tests/testctrl.prg | 0 .../{ => examples}/hbgf/tests/testform.prg | 0 harbour/contrib/hbwin/wapi_commctrl.c | 221 ++++++++++-------- harbour/contrib/hbwin/wapi_winuser.c | 55 +++-- 48 files changed, 176 insertions(+), 133 deletions(-) rename harbour/contrib/{ => examples}/hbgf/Makefile (93%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/Makefile (97%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/button.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/creabutt.c (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/creamenu.c (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/creawin.c (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/dispatch.c (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/form.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/general.c (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/harbgtk.ch (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/harbgtk.h (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/mainlgtk.c (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/menu.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/menuitem.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/msginfo.c (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/shared.ch (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfgtk/winctrl.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfos2/Makefile (92%) rename harbour/contrib/{ => examples}/hbgf/hbgfos2/button.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfos2/edit.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfos2/os2pm.c (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfos2/os2pm.ch (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfos2/tform.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfos2/tmenu.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfos2/tmenuit.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfos2/winctrl.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfwin/Makefile (92%) rename harbour/contrib/{ => examples}/hbgf/hbgfwin/button.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfwin/edit.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfwin/form.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfwin/hbgfwin.ch (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfwin/menu.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfwin/menuitem.prg (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfwin/winapi.c (100%) rename harbour/contrib/{ => examples}/hbgf/hbgfwin/winctrl.prg (100%) rename harbour/contrib/{ => examples}/hbgf/tests/form2.prg (100%) rename harbour/contrib/{ => examples}/hbgf/tests/form3.hbf (100%) rename harbour/contrib/{ => examples}/hbgf/tests/form3.prg (100%) rename harbour/contrib/{ => examples}/hbgf/tests/form3res.prg (100%) rename harbour/contrib/{ => examples}/hbgf/tests/formtext.prg (100%) rename harbour/contrib/{ => examples}/hbgf/tests/hbgf.hbp (100%) rename harbour/contrib/{ => examples}/hbgf/tests/testctrl.prg (100%) rename harbour/contrib/{ => examples}/hbgf/tests/testform.prg (100%) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 85b09e1cb7..c2d4b52a46 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,28 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-03-13 01:45 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * contrib/hbwin/wapi_commctrl.c + * contrib/hbwin/wapi_winuser.c + ! Lots of non-ANSI C comments converted to ANSI. + (may I please ask to pay attention to this?) + ! Fixed WAPI_GETSCROLLRANGE() return value. + ! non-WinCE compatible functions converted to stubs + when compiled for WinCE. + * Formatting. + + * contrib/Makefile + - contrib/hbgf + + contrib/examples/hbgf + * contrib/examples/hbgf/hbgfwin/Makefile + * contrib/examples/hbgf/hbgfos2/Makefile + * contrib/examples/hbgf/hbgfgtk/Makefile + * contrib/examples/hbgf/Makefile + * hbgf moved from contrib to examples. + + * contrib/examples/Makefile + * Updated. + 2009-03-13 01:36 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * config/dos/owatcom.cf * config/win/poccce.cf diff --git a/harbour/contrib/Makefile b/harbour/contrib/Makefile index 36a8829c25..52cc7715d4 100644 --- a/harbour/contrib/Makefile +++ b/harbour/contrib/Makefile @@ -14,7 +14,6 @@ DIRS=\ hbclipsm \ hbcrypt \ hbct \ - hbgf \ hbgt \ hbmisc \ hbmzip \ diff --git a/harbour/contrib/examples/Makefile b/harbour/contrib/examples/Makefile index 32ca994773..3409050588 100644 --- a/harbour/contrib/examples/Makefile +++ b/harbour/contrib/examples/Makefile @@ -6,6 +6,8 @@ ROOT = ../../ DIRS=\ guestbk \ + hbgf \ + hbsqlit2 \ hscript \ misc \ pe \ diff --git a/harbour/contrib/hbgf/Makefile b/harbour/contrib/examples/hbgf/Makefile similarity index 93% rename from harbour/contrib/hbgf/Makefile rename to harbour/contrib/examples/hbgf/Makefile index 45fe1687f0..1b0e000f09 100644 --- a/harbour/contrib/hbgf/Makefile +++ b/harbour/contrib/examples/hbgf/Makefile @@ -2,7 +2,7 @@ # $Id$ # -ROOT = ../../ +ROOT = ../../../ ifeq ($(HB_ARCHITECTURE),win) DIRS = hbgfwin diff --git a/harbour/contrib/hbgf/hbgfgtk/Makefile b/harbour/contrib/examples/hbgf/hbgfgtk/Makefile similarity index 97% rename from harbour/contrib/hbgf/hbgfgtk/Makefile rename to harbour/contrib/examples/hbgf/hbgfgtk/Makefile index 9f2a95850c..d8e9dfca7a 100644 --- a/harbour/contrib/hbgf/hbgfgtk/Makefile +++ b/harbour/contrib/examples/hbgf/hbgfgtk/Makefile @@ -2,7 +2,7 @@ # $Id$ # -ROOT = ../../../ +ROOT = ../../../../ LIBNAME=hbgfgtk diff --git a/harbour/contrib/hbgf/hbgfgtk/button.prg b/harbour/contrib/examples/hbgf/hbgfgtk/button.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfgtk/button.prg rename to harbour/contrib/examples/hbgf/hbgfgtk/button.prg diff --git a/harbour/contrib/hbgf/hbgfgtk/creabutt.c b/harbour/contrib/examples/hbgf/hbgfgtk/creabutt.c similarity index 100% rename from harbour/contrib/hbgf/hbgfgtk/creabutt.c rename to harbour/contrib/examples/hbgf/hbgfgtk/creabutt.c diff --git a/harbour/contrib/hbgf/hbgfgtk/creamenu.c b/harbour/contrib/examples/hbgf/hbgfgtk/creamenu.c similarity index 100% rename from harbour/contrib/hbgf/hbgfgtk/creamenu.c rename to harbour/contrib/examples/hbgf/hbgfgtk/creamenu.c diff --git a/harbour/contrib/hbgf/hbgfgtk/creawin.c b/harbour/contrib/examples/hbgf/hbgfgtk/creawin.c similarity index 100% rename from harbour/contrib/hbgf/hbgfgtk/creawin.c rename to harbour/contrib/examples/hbgf/hbgfgtk/creawin.c diff --git a/harbour/contrib/hbgf/hbgfgtk/dispatch.c b/harbour/contrib/examples/hbgf/hbgfgtk/dispatch.c similarity index 100% rename from harbour/contrib/hbgf/hbgfgtk/dispatch.c rename to harbour/contrib/examples/hbgf/hbgfgtk/dispatch.c diff --git a/harbour/contrib/hbgf/hbgfgtk/form.prg b/harbour/contrib/examples/hbgf/hbgfgtk/form.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfgtk/form.prg rename to harbour/contrib/examples/hbgf/hbgfgtk/form.prg diff --git a/harbour/contrib/hbgf/hbgfgtk/general.c b/harbour/contrib/examples/hbgf/hbgfgtk/general.c similarity index 100% rename from harbour/contrib/hbgf/hbgfgtk/general.c rename to harbour/contrib/examples/hbgf/hbgfgtk/general.c diff --git a/harbour/contrib/hbgf/hbgfgtk/harbgtk.ch b/harbour/contrib/examples/hbgf/hbgfgtk/harbgtk.ch similarity index 100% rename from harbour/contrib/hbgf/hbgfgtk/harbgtk.ch rename to harbour/contrib/examples/hbgf/hbgfgtk/harbgtk.ch diff --git a/harbour/contrib/hbgf/hbgfgtk/harbgtk.h b/harbour/contrib/examples/hbgf/hbgfgtk/harbgtk.h similarity index 100% rename from harbour/contrib/hbgf/hbgfgtk/harbgtk.h rename to harbour/contrib/examples/hbgf/hbgfgtk/harbgtk.h diff --git a/harbour/contrib/hbgf/hbgfgtk/mainlgtk.c b/harbour/contrib/examples/hbgf/hbgfgtk/mainlgtk.c similarity index 100% rename from harbour/contrib/hbgf/hbgfgtk/mainlgtk.c rename to harbour/contrib/examples/hbgf/hbgfgtk/mainlgtk.c diff --git a/harbour/contrib/hbgf/hbgfgtk/menu.prg b/harbour/contrib/examples/hbgf/hbgfgtk/menu.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfgtk/menu.prg rename to harbour/contrib/examples/hbgf/hbgfgtk/menu.prg diff --git a/harbour/contrib/hbgf/hbgfgtk/menuitem.prg b/harbour/contrib/examples/hbgf/hbgfgtk/menuitem.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfgtk/menuitem.prg rename to harbour/contrib/examples/hbgf/hbgfgtk/menuitem.prg diff --git a/harbour/contrib/hbgf/hbgfgtk/msginfo.c b/harbour/contrib/examples/hbgf/hbgfgtk/msginfo.c similarity index 100% rename from harbour/contrib/hbgf/hbgfgtk/msginfo.c rename to harbour/contrib/examples/hbgf/hbgfgtk/msginfo.c diff --git a/harbour/contrib/hbgf/hbgfgtk/shared.ch b/harbour/contrib/examples/hbgf/hbgfgtk/shared.ch similarity index 100% rename from harbour/contrib/hbgf/hbgfgtk/shared.ch rename to harbour/contrib/examples/hbgf/hbgfgtk/shared.ch diff --git a/harbour/contrib/hbgf/hbgfgtk/winctrl.prg b/harbour/contrib/examples/hbgf/hbgfgtk/winctrl.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfgtk/winctrl.prg rename to harbour/contrib/examples/hbgf/hbgfgtk/winctrl.prg diff --git a/harbour/contrib/hbgf/hbgfos2/Makefile b/harbour/contrib/examples/hbgf/hbgfos2/Makefile similarity index 92% rename from harbour/contrib/hbgf/hbgfos2/Makefile rename to harbour/contrib/examples/hbgf/hbgfos2/Makefile index dbcd7c61fe..add4e4eb77 100644 --- a/harbour/contrib/hbgf/hbgfos2/Makefile +++ b/harbour/contrib/examples/hbgf/hbgfos2/Makefile @@ -2,7 +2,7 @@ # $Id$ # -ROOT = ../../../ +ROOT = ../../../../ LIBNAME=hbgfos2 diff --git a/harbour/contrib/hbgf/hbgfos2/button.prg b/harbour/contrib/examples/hbgf/hbgfos2/button.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfos2/button.prg rename to harbour/contrib/examples/hbgf/hbgfos2/button.prg diff --git a/harbour/contrib/hbgf/hbgfos2/edit.prg b/harbour/contrib/examples/hbgf/hbgfos2/edit.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfos2/edit.prg rename to harbour/contrib/examples/hbgf/hbgfos2/edit.prg diff --git a/harbour/contrib/hbgf/hbgfos2/os2pm.c b/harbour/contrib/examples/hbgf/hbgfos2/os2pm.c similarity index 100% rename from harbour/contrib/hbgf/hbgfos2/os2pm.c rename to harbour/contrib/examples/hbgf/hbgfos2/os2pm.c diff --git a/harbour/contrib/hbgf/hbgfos2/os2pm.ch b/harbour/contrib/examples/hbgf/hbgfos2/os2pm.ch similarity index 100% rename from harbour/contrib/hbgf/hbgfos2/os2pm.ch rename to harbour/contrib/examples/hbgf/hbgfos2/os2pm.ch diff --git a/harbour/contrib/hbgf/hbgfos2/tform.prg b/harbour/contrib/examples/hbgf/hbgfos2/tform.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfos2/tform.prg rename to harbour/contrib/examples/hbgf/hbgfos2/tform.prg diff --git a/harbour/contrib/hbgf/hbgfos2/tmenu.prg b/harbour/contrib/examples/hbgf/hbgfos2/tmenu.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfos2/tmenu.prg rename to harbour/contrib/examples/hbgf/hbgfos2/tmenu.prg diff --git a/harbour/contrib/hbgf/hbgfos2/tmenuit.prg b/harbour/contrib/examples/hbgf/hbgfos2/tmenuit.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfos2/tmenuit.prg rename to harbour/contrib/examples/hbgf/hbgfos2/tmenuit.prg diff --git a/harbour/contrib/hbgf/hbgfos2/winctrl.prg b/harbour/contrib/examples/hbgf/hbgfos2/winctrl.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfos2/winctrl.prg rename to harbour/contrib/examples/hbgf/hbgfos2/winctrl.prg diff --git a/harbour/contrib/hbgf/hbgfwin/Makefile b/harbour/contrib/examples/hbgf/hbgfwin/Makefile similarity index 92% rename from harbour/contrib/hbgf/hbgfwin/Makefile rename to harbour/contrib/examples/hbgf/hbgfwin/Makefile index 523eed1264..d6a995fc0c 100644 --- a/harbour/contrib/hbgf/hbgfwin/Makefile +++ b/harbour/contrib/examples/hbgf/hbgfwin/Makefile @@ -2,7 +2,7 @@ # $Id$ # -ROOT = ../../../ +ROOT = ../../../../ LIBNAME=hbgfwin diff --git a/harbour/contrib/hbgf/hbgfwin/button.prg b/harbour/contrib/examples/hbgf/hbgfwin/button.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfwin/button.prg rename to harbour/contrib/examples/hbgf/hbgfwin/button.prg diff --git a/harbour/contrib/hbgf/hbgfwin/edit.prg b/harbour/contrib/examples/hbgf/hbgfwin/edit.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfwin/edit.prg rename to harbour/contrib/examples/hbgf/hbgfwin/edit.prg diff --git a/harbour/contrib/hbgf/hbgfwin/form.prg b/harbour/contrib/examples/hbgf/hbgfwin/form.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfwin/form.prg rename to harbour/contrib/examples/hbgf/hbgfwin/form.prg diff --git a/harbour/contrib/hbgf/hbgfwin/hbgfwin.ch b/harbour/contrib/examples/hbgf/hbgfwin/hbgfwin.ch similarity index 100% rename from harbour/contrib/hbgf/hbgfwin/hbgfwin.ch rename to harbour/contrib/examples/hbgf/hbgfwin/hbgfwin.ch diff --git a/harbour/contrib/hbgf/hbgfwin/menu.prg b/harbour/contrib/examples/hbgf/hbgfwin/menu.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfwin/menu.prg rename to harbour/contrib/examples/hbgf/hbgfwin/menu.prg diff --git a/harbour/contrib/hbgf/hbgfwin/menuitem.prg b/harbour/contrib/examples/hbgf/hbgfwin/menuitem.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfwin/menuitem.prg rename to harbour/contrib/examples/hbgf/hbgfwin/menuitem.prg diff --git a/harbour/contrib/hbgf/hbgfwin/winapi.c b/harbour/contrib/examples/hbgf/hbgfwin/winapi.c similarity index 100% rename from harbour/contrib/hbgf/hbgfwin/winapi.c rename to harbour/contrib/examples/hbgf/hbgfwin/winapi.c diff --git a/harbour/contrib/hbgf/hbgfwin/winctrl.prg b/harbour/contrib/examples/hbgf/hbgfwin/winctrl.prg similarity index 100% rename from harbour/contrib/hbgf/hbgfwin/winctrl.prg rename to harbour/contrib/examples/hbgf/hbgfwin/winctrl.prg diff --git a/harbour/contrib/hbgf/tests/form2.prg b/harbour/contrib/examples/hbgf/tests/form2.prg similarity index 100% rename from harbour/contrib/hbgf/tests/form2.prg rename to harbour/contrib/examples/hbgf/tests/form2.prg diff --git a/harbour/contrib/hbgf/tests/form3.hbf b/harbour/contrib/examples/hbgf/tests/form3.hbf similarity index 100% rename from harbour/contrib/hbgf/tests/form3.hbf rename to harbour/contrib/examples/hbgf/tests/form3.hbf diff --git a/harbour/contrib/hbgf/tests/form3.prg b/harbour/contrib/examples/hbgf/tests/form3.prg similarity index 100% rename from harbour/contrib/hbgf/tests/form3.prg rename to harbour/contrib/examples/hbgf/tests/form3.prg diff --git a/harbour/contrib/hbgf/tests/form3res.prg b/harbour/contrib/examples/hbgf/tests/form3res.prg similarity index 100% rename from harbour/contrib/hbgf/tests/form3res.prg rename to harbour/contrib/examples/hbgf/tests/form3res.prg diff --git a/harbour/contrib/hbgf/tests/formtext.prg b/harbour/contrib/examples/hbgf/tests/formtext.prg similarity index 100% rename from harbour/contrib/hbgf/tests/formtext.prg rename to harbour/contrib/examples/hbgf/tests/formtext.prg diff --git a/harbour/contrib/hbgf/tests/hbgf.hbp b/harbour/contrib/examples/hbgf/tests/hbgf.hbp similarity index 100% rename from harbour/contrib/hbgf/tests/hbgf.hbp rename to harbour/contrib/examples/hbgf/tests/hbgf.hbp diff --git a/harbour/contrib/hbgf/tests/testctrl.prg b/harbour/contrib/examples/hbgf/tests/testctrl.prg similarity index 100% rename from harbour/contrib/hbgf/tests/testctrl.prg rename to harbour/contrib/examples/hbgf/tests/testctrl.prg diff --git a/harbour/contrib/hbgf/tests/testform.prg b/harbour/contrib/examples/hbgf/tests/testform.prg similarity index 100% rename from harbour/contrib/hbgf/tests/testform.prg rename to harbour/contrib/examples/hbgf/tests/testform.prg diff --git a/harbour/contrib/hbwin/wapi_commctrl.c b/harbour/contrib/hbwin/wapi_commctrl.c index 69c2195a61..2c92662c9b 100644 --- a/harbour/contrib/hbwin/wapi_commctrl.c +++ b/harbour/contrib/hbwin/wapi_commctrl.c @@ -46,6 +46,7 @@ * If you do not wish that, delete this exception notice. * */ + /*----------------------------------------------------------------------*/ #define HB_OS_WIN_USED @@ -55,9 +56,9 @@ #include "hbwapi.h" #include -/*----------------------------------------------------------------------// +/*----------------------------------------------------------------------*/ BEGIN - ImageList_* - API -//----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ /* int ImageList_Add( HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask ); */ @@ -258,10 +259,10 @@ BOOL ImageList_GetIconSize( HIMAGELIST himl, int *cx, int *cy ); */ HB_FUNC( WAPI_IMAGELIST_GETICONSIZE ) { - int cx ; - int cy ; + int cx; + int cy; - if ( ImageList_GetIconSize( wapi_par_HIMAGELIST( 1 ), &cx, &cy ) ) + if( ImageList_GetIconSize( wapi_par_HIMAGELIST( 1 ), &cx, &cy ) ) { hb_storni( cx, 2 ); hb_storni( cy, 3 ); @@ -269,7 +270,7 @@ HB_FUNC( WAPI_IMAGELIST_GETICONSIZE ) } else { - hb_retl( 0 ); + hb_retl( 0 ); } } /*----------------------------------------------------------------------*/ @@ -287,11 +288,11 @@ BOOL ImageList_GetImageInfo( HIMAGELIST himl, int i, IMAGEINFO *pImageInfo ); */ HB_FUNC( WAPI_IMAGELIST_GETIMAGEINFO ) { - IMAGEINFO ii ; + IMAGEINFO ii; if( ImageList_GetImageInfo( wapi_par_HIMAGELIST( 1 ), wapi_par_INT( 2 ), &ii ) ) { - hb_retclen( ( char* ) &ii, sizeof( IMAGEINFO ) ); + hb_retclen( ( char * ) &ii, sizeof( IMAGEINFO ) ); } } /*----------------------------------------------------------------------*/ @@ -459,15 +460,15 @@ HB_FUNC( WAPI_IMAGELIST_WRITEEX ) { } #endif -/*----------------------------------------------------------------------// -// END - ImageList_* - API -//----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/* END - ImageList_* - API */ +/*----------------------------------------------------------------------*/ -/*----------------------------------------------------------------------// +/*----------------------------------------------------------------------*/ Tab Control Macros -//----------------------------------------------------------------------*/ -// Wapi_TabCtrl_InsertItem( hWndTab, nInsertPos, cText, iImageListIndex ) +/*----------------------------------------------------------------------*/ +/* Wapi_TabCtrl_InsertItem( hWndTab, nInsertPos, cText, iImageListIndex ) */ HB_FUNC( WAPI_TABCTRL_INSERTITEM ) { @@ -486,13 +487,13 @@ HB_FUNC( WAPI_TABCTRL_INSERTITEM ) HB_FUNC( WAPI_TABCTRL_SETCURSEL ) { - wapi_ret_NI( TabCtrl_SetCurSel( wapi_par_HWND( 1 ) , hb_parni (2) ) ); + wapi_ret_NI( TabCtrl_SetCurSel( wapi_par_HWND( 1 ) , hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ HB_FUNC( WAPI_TABCTRL_GETCURSEL ) { - wapi_ret_NI( TabCtrl_GetCurSel( wapi_par_HWND( 1 ) ) ) ; + wapi_ret_NI( TabCtrl_GetCurSel( wapi_par_HWND( 1 ) ) ); } /*----------------------------------------------------------------------*/ @@ -501,13 +502,13 @@ HB_FUNC( WAPI_TABCTRL_GETITEM ) TC_ITEM item; hb_retl( TabCtrl_GetItem( wapi_par_HWND( 1 ), wapi_par_INT( 2 ), &item ) ); - // assign item to param 3 + /* assign item to param 3 */ } /*----------------------------------------------------------------------*/ HB_FUNC( WAPI_TABCTRL_GETITEMCOUNT ) { - wapi_ret_NI( TabCtrl_GetItemCount( wapi_par_HWND( 1 ) ) ) ; + wapi_ret_NI( TabCtrl_GetItemCount( wapi_par_HWND( 1 ) ) ); } /*----------------------------------------------------------------------*/ @@ -541,28 +542,28 @@ HB_FUNC( WAPI_TABCTRL_GETITEMRECT ) HB_FUNC( WAPI_TABCTRL_GETROWCOUNT ) { - wapi_ret_NI( TabCtrl_GetRowCount( wapi_par_HWND( 1 ) ) ) ; + wapi_ret_NI( TabCtrl_GetRowCount( wapi_par_HWND( 1 ) ) ); } /*----------------------------------------------------------------------*/ -// TabCtrl_GetImageList(hwnd) -// (HIMAGELIST)SNDMSG((hwnd), TCM_GETIMAGELIST, 0, 0L) +/* TabCtrl_GetImageList(hwnd) */ +/* (HIMAGELIST)SNDMSG((hwnd), TCM_GETIMAGELIST, 0, 0L) */ HB_FUNC( WAPI_TABCTRL_GETIMAGELIST ) { - wapi_ret_NINT( ( LONG ) TabCtrl_GetImageList( wapi_par_HWND( 1 ) ) ) ; + wapi_ret_NINT( ( LONG ) TabCtrl_GetImageList( wapi_par_HWND( 1 ) ) ); } /*----------------------------------------------------------------------*/ -// #define TabCtrl_SetImageList(hwnd, himl) -// (HIMAGELIST)SNDMSG((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(HIMAGELIST)(himl)) +/* #define TabCtrl_SetImageList(hwnd, himl) */ +/* (HIMAGELIST)SNDMSG((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(HIMAGELIST)(himl)) */ HB_FUNC( WAPI_TABCTRL_SETIMAGELIST ) { wapi_ret_NINT( ( HB_PTRDIFF ) TabCtrl_SetImageList( wapi_par_HWND( 1 ), - wapi_par_HIMAGELIST( 2 ) ) ) ; + wapi_par_HIMAGELIST( 2 ) ) ); } /*----------------------------------------------------------------------*/ -// Wapi_TabCtrl_SetItem( hWndTab, nInsertPos, cText, iImageListIndex ) -// (BOOL)SNDMSG((hwnd), TCM_SETITEM, (WPARAM)(int)(iItem), (LPARAM)(TC_ITEM FAR*)(pitem)) +/* Wapi_TabCtrl_SetItem( hWndTab, nInsertPos, cText, iImageListIndex ) */ +/* (BOOL)SNDMSG((hwnd), TCM_SETITEM, (WPARAM)(int)(iItem), (LPARAM)(TC_ITEM FAR*)(pitem)) */ HB_FUNC( WAPI_TABCTRL_SETITEM ) { @@ -573,188 +574,203 @@ HB_FUNC( WAPI_TABCTRL_SETITEM ) item.iImage = ISNIL( 4 ) ? -1 : wapi_par_INT( 4 ); item.pszText = szText; - wapi_ret_L( TabCtrl_SetItem( wapi_par_HWND( 1 ), wapi_par_INT( 2 ), &item ) ) ; + wapi_ret_L( TabCtrl_SetItem( wapi_par_HWND( 1 ), wapi_par_INT( 2 ), &item ) ); HB_TCHAR_FREE( szText ); } /*----------------------------------------------------------------------*/ -// TabCtrl_DeleteAllItems(hwnd) -// (BOOL)SNDMSG((hwnd), TCM_DELETEALLITEMS, 0, 0L) +/* TabCtrl_DeleteAllItems(hwnd) */ +/* (BOOL)SNDMSG((hwnd), TCM_DELETEALLITEMS, 0, 0L) */ HB_FUNC( WAPI_TABCTRL_DELETEALLITEMS ) { wapi_ret_L( TabCtrl_DeleteAllItems( wapi_par_HWND( 1 ) ) ); } /*----------------------------------------------------------------------*/ -// TabCtrl_DeleteItem(hwnd, i) -// (BOOL)SNDMSG((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L) +/* TabCtrl_DeleteItem(hwnd, i) */ +/* (BOOL)SNDMSG((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L) */ HB_FUNC( WAPI_TABCTRL_DELETEITEM ) { wapi_ret_L( TabCtrl_DeleteItem( wapi_par_HWND( 1 ), ( WPARAM ) wapi_par_INT( 2 ) ) ); } /*----------------------------------------------------------------------*/ -// TabCtrl_HitTest(hwndTC, pinfo) -// (int)SNDMSG((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO FAR*)(pinfo)) +/* TabCtrl_HitTest(hwndTC, pinfo) */ +/* (int)SNDMSG((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO FAR*)(pinfo)) */ -// waiting for structures +/* waiting for structures */ HB_FUNC( WAPI_TABCTRL_HITTEST ) { - TCHITTESTINFO tcht ; + TCHITTESTINFO tcht; - hb_parni( TabCtrl_HitTest( wapi_par_HWND( 1 ), &tcht ) ) ; + hb_parni( TabCtrl_HitTest( wapi_par_HWND( 1 ), &tcht ) ); } /*----------------------------------------------------------------------*/ -// TabCtrl_SetItemExtra(hwndTC, cb) -// (BOOL)SNDMSG((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L) +/* TabCtrl_SetItemExtra(hwndTC, cb) */ +/* (BOOL)SNDMSG((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L) */ HB_FUNC( WAPI_TABCTRL_SETITEMEXTRA ) { - wapi_ret_L( TabCtrl_SetItemExtra( wapi_par_HWND( 1 ), wapi_par_INT( 2 ) ) ) ; + wapi_ret_L( TabCtrl_SetItemExtra( wapi_par_HWND( 1 ), wapi_par_INT( 2 ) ) ); } /*----------------------------------------------------------------------*/ -// TabCtrl_AdjustRect(hwnd, bLarger, prc) -// (int)SNDMSG(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)(bLarger), (LPARAM)(RECT FAR *)prc) +/* TabCtrl_AdjustRect(hwnd, bLarger, prc) */ +/* (int)SNDMSG(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)(bLarger), (LPARAM)(RECT FAR *)prc) */ HB_FUNC( WAPI_TABCTRL_ADJUSTRECT ) { - RECT rc; + if( ISARRAY( 3 ) ) + { + RECT rc; - if ( ISARRAY(3) ) - { - rc.left = hb_parnl( 3, 1 ); - rc.top = hb_parnl( 3, 2 ); - rc.right = hb_parnl( 3, 3 ); - rc.bottom = hb_parnl( 3, 4 ); + rc.left = hb_parnl( 3, 1 ); + rc.top = hb_parnl( 3, 2 ); + rc.right = hb_parnl( 3, 3 ); + rc.bottom = hb_parnl( 3, 4 ); - TabCtrl_AdjustRect( wapi_par_HWND( 1 ), wapi_par_BOOL( 2 ), &rc ); + TabCtrl_AdjustRect( wapi_par_HWND( 1 ), wapi_par_BOOL( 2 ), &rc ); - hb_stornl( rc.left , 3, 1 ); - hb_stornl( rc.top , 3, 2 ); - hb_stornl( rc.right , 3, 3 ); - hb_stornl( rc.bottom, 3, 4 ); - } + hb_stornl( rc.left , 3, 1 ); + hb_stornl( rc.top , 3, 2 ); + hb_stornl( rc.right , 3, 3 ); + hb_stornl( rc.bottom, 3, 4 ); + } } /*----------------------------------------------------------------------*/ -// TabCtrl_SetItemSize(hwnd, x, y) -// (DWORD)SNDMSG((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y)) +/* TabCtrl_SetItemSize(hwnd, x, y) */ +/* (DWORD)SNDMSG((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y)) */ HB_FUNC( WAPI_TABCTRL_SETITEMSIZE ) { wapi_ret_NINT( TabCtrl_SetItemSize( wapi_par_HWND( 1 ), wapi_par_INT( 2 ), wapi_par_INT( 3 ) ) ); } /*----------------------------------------------------------------------*/ -// TabCtrl_RemoveImage(hwnd, i) -// (void)SNDMSG((hwnd), TCM_REMOVEIMAGE, i, 0L) +/* TabCtrl_RemoveImage(hwnd, i) */ +/* (void)SNDMSG((hwnd), TCM_REMOVEIMAGE, i, 0L) */ HB_FUNC( WAPI_TABCTRL_REMOVEIMAGE ) { - TabCtrl_RemoveImage( wapi_par_HWND( 1 ), wapi_par_INT( 2 ) ) ; + TabCtrl_RemoveImage( wapi_par_HWND( 1 ), wapi_par_INT( 2 ) ); } /*----------------------------------------------------------------------*/ -// TabCtrl_SetPadding(hwnd, cx, cy) -// (void)SNDMSG((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy)) +/* TabCtrl_SetPadding(hwnd, cx, cy) */ +/* (void)SNDMSG((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy)) */ HB_FUNC( WAPI_TABCTRL_SETPADDING ) { - TabCtrl_SetPadding( wapi_par_HWND( 1 ), wapi_par_INT( 2 ), wapi_par_INT( 3 ) ) ; + TabCtrl_SetPadding( wapi_par_HWND( 1 ), wapi_par_INT( 2 ), wapi_par_INT( 3 ) ); } /*----------------------------------------------------------------------*/ -// TabCtrl_GetToolTips(hwnd) -// (HWND)SNDMSG((hwnd), TCM_GETTOOLTIPS, 0, 0L) +/* TabCtrl_GetToolTips(hwnd) */ +/* (HWND)SNDMSG((hwnd), TCM_GETTOOLTIPS, 0, 0L) */ HB_FUNC( WAPI_TABCTRL_GETTOOLTIPS ) { +#if ! defined(HB_OS_WIN_CE) wapi_ret_NINT( ( HB_PTRDIFF ) TabCtrl_GetToolTips( wapi_par_HWND( 1 ) ) ); +#else + wapi_ret_NINT( -1 ); +#endif } /*----------------------------------------------------------------------*/ -// TabCtrl_SetToolTips(hwnd, hwndTT) -// (void)SNDMSG((hwnd), TCM_SETTOOLTIPS, (WPARAM)(hwndTT), 0L) +/* TabCtrl_SetToolTips(hwnd, hwndTT) */ +/* (void)SNDMSG((hwnd), TCM_SETTOOLTIPS, (WPARAM)(hwndTT), 0L) */ HB_FUNC( WAPI_TABCTRL_SETTOOLTIPS ) { - TabCtrl_SetToolTips( wapi_par_HWND( 1 ), wapi_par_HWND( 2 ) ) ; +#if ! defined(HB_OS_WIN_CE) + TabCtrl_SetToolTips( wapi_par_HWND( 1 ), wapi_par_HWND( 2 ) ); +#endif } /*----------------------------------------------------------------------*/ -// TabCtrl_GetCurFocus(hwnd) -// (int)SNDMSG((hwnd), TCM_GETCURFOCUS, 0, 0) +/* TabCtrl_GetCurFocus(hwnd) */ +/* (int)SNDMSG((hwnd), TCM_GETCURFOCUS, 0, 0) */ HB_FUNC( WAPI_TABCTRL_GETCURFOCUS ) { wapi_ret_NI( TabCtrl_GetCurFocus( wapi_par_HWND( 1 ) ) ); } /*----------------------------------------------------------------------*/ -// TabCtrl_SetCurFocus(hwnd, i) -// SNDMSG((hwnd),TCM_SETCURFOCUS, i, 0) +/* TabCtrl_SetCurFocus(hwnd, i) */ +/* SNDMSG((hwnd),TCM_SETCURFOCUS, i, 0) */ HB_FUNC( WAPI_TABCTRL_SETCURFOCUS ) { TabCtrl_SetCurFocus( wapi_par_HWND( 1 ), wapi_par_INT( 2 ) ); } /*----------------------------------------------------------------------*/ -// TabCtrl_SetMinTabWidth(hwnd, x) -// (int)SNDMSG((hwnd), TCM_SETMINTABWIDTH, 0, x) +/* TabCtrl_SetMinTabWidth(hwnd, x) */ +/* (int)SNDMSG((hwnd), TCM_SETMINTABWIDTH, 0, x) */ HB_FUNC( WAPI_TABCTRL_SETMINTABWIDTH ) { - //wapi_ret_NI( TabCtrl_SetMinTabWidth( wapi_par_HWND( 1 ), wapi_par_INT( 2 ) ) ); + /* wapi_ret_NI( TabCtrl_SetMinTabWidth( wapi_par_HWND( 1 ), wapi_par_INT( 2 ) ) ); */ wapi_ret_NI( ( int ) SendMessage( wapi_par_HWND( 1 ), TCM_SETMINTABWIDTH, ( WPARAM ) 0, ( LPARAM ) wapi_par_INT( 2 ) ) ); } /*----------------------------------------------------------------------*/ -// TabCtrl_DeselectAll(hwnd, fExcludeFocus) -// (void)SNDMSG((hwnd), TCM_DESELECTALL, fExcludeFocus, 0) +/* TabCtrl_DeselectAll(hwnd, fExcludeFocus) */ +/* (void)SNDMSG((hwnd), TCM_DESELECTALL, fExcludeFocus, 0) */ HB_FUNC( WAPI_TABCTRL_DESELECTALL ) { - //TabCtrl_DeselectAll( wapi_par_HWND( 1 ), wapi_par_UINT( 2 ) ) ; - SendMessage( wapi_par_HWND( 1 ), TCM_DESELECTALL, ( WPARAM ) wapi_par_UINT( 2 ), ( LPARAM ) 0 ) ; + /* TabCtrl_DeselectAll( wapi_par_HWND( 1 ), wapi_par_UINT( 2 ) ); */ + SendMessage( wapi_par_HWND( 1 ), TCM_DESELECTALL, ( WPARAM ) wapi_par_UINT( 2 ), ( LPARAM ) 0 ); } /*----------------------------------------------------------------------*/ + #if (_WIN32_IE >= 0x0400) -// TabCtrl_HighlightItem(hwnd, i, fHighlight) -// (BOOL)SNDMSG((hwnd), TCM_HIGHLIGHTITEM, (WPARAM)(i), (LPARAM)MAKELONG (fHighlight, 0)) + +/* TabCtrl_HighlightItem(hwnd, i, fHighlight) */ +/* (BOOL)SNDMSG((hwnd), TCM_HIGHLIGHTITEM, (WPARAM)(i), (LPARAM)MAKELONG (fHighlight, 0)) */ HB_FUNC( WAPI_TABCTRL_HIGHLIGHTITEM ) { wapi_ret_L( TabCtrl_HighlightItem( wapi_par_HWND( 1 ), wapi_par_INT( 2 ), wapi_par_WORD( 3 ) ) ); } /*----------------------------------------------------------------------*/ -// TabCtrl_SetExtendedStyle(hwnd, dw) -// (DWORD)SNDMSG((hwnd), TCM_SETEXTENDEDSTYLE, 0, dw) +/* TabCtrl_SetExtendedStyle(hwnd, dw) */ +/* (DWORD)SNDMSG((hwnd), TCM_SETEXTENDEDSTYLE, 0, dw) */ HB_FUNC( WAPI_TABCTRL_SETEXTENDEDSTYLE ) { - wapi_ret_NINT( TabCtrl_SetExtendedStyle( wapi_par_HWND( 1 ), wapi_par_DWORD( 2 ) ) ) ; + wapi_ret_NINT( TabCtrl_SetExtendedStyle( wapi_par_HWND( 1 ), wapi_par_DWORD( 2 ) ) ); } /*----------------------------------------------------------------------*/ -// TabCtrl_GetExtendedStyle(hwnd) -// (DWORD)SNDMSG((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0) +/* TabCtrl_GetExtendedStyle(hwnd) +/* (DWORD)SNDMSG((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0) HB_FUNC( WAPI_TABCTRL_GETEXTENDEDSTYLE ) { - wapi_ret_NINT( TabCtrl_GetExtendedStyle( wapi_par_HWND( 1 ) ) ) ; + wapi_ret_NINT( TabCtrl_GetExtendedStyle( wapi_par_HWND( 1 ) ) ); } /*----------------------------------------------------------------------*/ -// TabCtrl_SetUnicodeFormat(hwnd, fUnicode) -// (BOOL)SNDMSG((hwnd), TCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0) +/* TabCtrl_SetUnicodeFormat(hwnd, fUnicode) */ +/* (BOOL)SNDMSG((hwnd), TCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0) */ HB_FUNC( WAPI_TABCTRL_SETUNICODEFORMAT ) { +#if ! defined(HB_OS_WIN_CE) wapi_ret_L( TabCtrl_SetUnicodeFormat( wapi_par_HWND( 1 ), wapi_par_BOOL( 2 ) ) ); +#endif } /*----------------------------------------------------------------------*/ -// TabCtrl_GetUnicodeFormat(hwnd) -// (BOOL)SNDMSG((hwnd), TCM_GETUNICODEFORMAT, 0, 0) +/* TabCtrl_GetUnicodeFormat(hwnd) */ +/* (BOOL)SNDMSG((hwnd), TCM_GETUNICODEFORMAT, 0, 0) */ HB_FUNC( WAPI_TABCTRL_GETUNICODEFORMAT ) { - wapi_ret_L( TabCtrl_GetUnicodeFormat( wapi_par_HWND( 1 ) ) ) ; -} +#if ! defined(HB_OS_WIN_CE) + wapi_ret_L( TabCtrl_GetUnicodeFormat( wapi_par_HWND( 1 ) ) ); +#else + wapi_ret_L( FALSE ); #endif +} + +#endif + /*----------------------------------------------------------------------*/ -/*----------------------------------------------------------------------*/ -// not an API +/* not an API */ HB_FUNC( WAPI_TABCTRL_CREATE ) { @@ -762,16 +778,16 @@ HB_FUNC( WAPI_TABCTRL_CREATE ) HWND hbutton; LONG hFont; LONG style; - style = ISNIL(6) ? 0 : (LONG) hb_parnl(6); - hwnd = (HWND) hb_parnl (1); - hFont = SendMessage( hwnd, WM_GETFONT, 0, 0); - hbutton = CreateWindowEx(0, WC_TABCONTROL, NULL , style, hb_parni(2), hb_parni(3) , hb_parni(4), hb_parni(5) , hwnd,NULL, GetModuleHandle(NULL) , NULL ) ; - SendMessage(hbutton,(UINT)WM_SETFONT, (WPARAM) hFont, 1 ) ; - hb_retnl ( (LONG) hbutton ); + style = ISNIL( 6 ) ? 0 : ( LONG ) hb_parnl( 6 ); + hwnd = ( HWND ) hb_parnl( 1 ); + hFont = SendMessage( hwnd, WM_GETFONT, 0, 0 ); + hbutton = CreateWindowEx( 0, WC_TABCONTROL, NULL, style, hb_parni( 2 ), hb_parni( 3 ) , hb_parni( 4 ), hb_parni( 5 ), hwnd, NULL, GetModuleHandle( NULL ), NULL ); + SendMessage( hbutton, ( UINT ) WM_SETFONT, ( WPARAM ) hFont, 1 ); + hb_retnl( ( LONG ) hbutton ); } /*----------------------------------------------------------------------*/ -// not an API +/* not an API */ HB_FUNC( WAPI_TABCTRL_ADDITEM ) { @@ -787,4 +803,3 @@ HB_FUNC( WAPI_TABCTRL_ADDITEM ) HB_TCHAR_FREE( szText ); } /*----------------------------------------------------------------------*/ - diff --git a/harbour/contrib/hbwin/wapi_winuser.c b/harbour/contrib/hbwin/wapi_winuser.c index f4b0a7802e..f1981ff71d 100644 --- a/harbour/contrib/hbwin/wapi_winuser.c +++ b/harbour/contrib/hbwin/wapi_winuser.c @@ -62,9 +62,13 @@ BOOL EnableScrollBar( HWND hWnd, UINT wSBflags, UINT wArrows ); */ HB_FUNC( WAPI_ENABLESCROLLBAR ) { +#if ! defined(HB_OS_WIN_CE) wapi_ret_L( EnableScrollBar( wapi_par_HWND( 1 ), wapi_par_UINT( 2 ), wapi_par_UINT( 3 ) ) ); +#else + wapi_ret_L( FALSE ); +#endif } /*----------------------------------------------------------------------*/ /* @@ -106,19 +110,14 @@ BOOL GetScrollInfo( HWND hwnd, int fnBar, LPSCROLLINFO lpsi ); HB_FUNC( WAPI_GETSCROLLINFO ) { LPSCROLLINFO si = ( LPSCROLLINFO ) wapi_par_STRUCT( 3 ); - //LPSCROLLINFO si; BOOL bSuccess; - //memset( si, 0, sizeof( SCROLLINFO ) ); - //si->cbSize = sizeof( SCROLLINFO ); - bSuccess = GetScrollInfo( wapi_par_HWND( 1 ), wapi_par_INT( 2 ), si ); if( bSuccess ) - { hb_storclen( ( char* ) &si, 3, sizeof( SCROLLINFO ) ); - } + wapi_ret_L( bSuccess ); } /*----------------------------------------------------------------------*/ @@ -127,8 +126,12 @@ int GetScrollPos( HWND hWnd, int nBar ); */ HB_FUNC( WAPI_GETSCROLLPOS ) { +#if ! defined(HB_OS_WIN_CE) wapi_ret_NI( GetScrollPos( wapi_par_HWND( 1 ), wapi_par_INT( 2 ) ) ); +#else + wapi_ret_NI( 0 ); +#endif } /*----------------------------------------------------------------------*/ /* @@ -136,18 +139,24 @@ BOOL GetScrollRange( HWND hWnd, int nBar, LPINT lpMinPos, LPINT lpMaxPos ); */ HB_FUNC( WAPI_GETSCROLLRANGE ) { - int minPos, maxPos; - - if( GetScrollRange( wapi_par_HWND( 1 ), - wapi_par_INT( 2 ), - &minPos, - &maxPos ) ) +#if ! defined(HB_OS_WIN_CE) { - hb_storni( minPos, 3 ); - hb_storni( maxPos, 4 ); + int minPos, maxPos; - wapi_ret_L( TRUE ); + if( GetScrollRange( wapi_par_HWND( 1 ), + wapi_par_INT( 2 ), + &minPos, + &maxPos ) ) + { + hb_storni( minPos, 3 ); + hb_storni( maxPos, 4 ); + + wapi_ret_L( TRUE ); + return; + } } +#endif + wapi_ret_L( FALSE ); } /*----------------------------------------------------------------------*/ @@ -221,9 +230,13 @@ BOOL ShowScrollBar( HWND hWnd, int wBar, BOOL bShow ); */ HB_FUNC( WAPI_SHOWSCROLLBAR ) { +#if ! defined(HB_OS_WIN_CE) wapi_ret_L( ShowScrollBar( wapi_par_HWND( 1 ), wapi_par_INT( 2 ), wapi_par_BOOL( 3 ) ) ); +#else + wapi_ret_L( FALSE ); +#endif } /*----------------------------------------------------------------------*/ /* */ @@ -244,29 +257,21 @@ HB_FUNC( WAPI_LOADBITMAP ) HBITMAP hbmp; if( ISNUM( 2 ) ) - { lpBmp = ( LPTSTR ) MAKEINTRESOURCE( wapi_par_INT( 2 ) ); - } else - { lpBmp = ( LPTSTR ) HB_TCHAR_CONVTO( hb_parc( 2 ) ); - } hbmp = LoadBitmap( hinst, lpBmp ); if( hbmp ) { hb_ToOutDebug( "hbmp loaded" ); - wapi_ret_NINT( (long) hbmp ); + wapi_ret_NINT( ( long ) hbmp ); } else wapi_ret_NI( 0 ); - //wapi_ret_NINT( ( long ) LoadBitmap( GetModuleHandle( 0 ), lpBmp ) ); - if( !ISNUM( 2 ) ) - { + if( ! ISNUM( 2 ) ) HB_TCHAR_FREE( lpBmp ); - } } #endif /*----------------------------------------------------------------------*/ -