From 9aa7d485f0cfc6655eba2efa0f92e80cca33b5ca Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Thu, 8 Dec 2011 20:40:16 +0000 Subject: [PATCH] 2011-12-08 12:36 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/gtwvg/wvgwin.c * Optimized: string handelling. * contrib/gtwvg/wvtwin.ch + Added: few more constants. --- harbour/ChangeLog | 7 +++++++ harbour/contrib/gtwvg/wvgwin.c | 16 +++++++++------- harbour/contrib/gtwvg/wvtwin.ch | 21 ++++++++++++++++++++- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8b1527f27a..f13dc4c455 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,13 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-08 12:36 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/gtwvg/wvgwin.c + * Optimized: string handelling. + + * contrib/gtwvg/wvtwin.ch + + Added: few more constants. + 2011-12-08 12:19 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/gtwvg/gtwvg.c ! Fixed: Menu Key Event was being generated even on BN_CLICK diff --git a/harbour/contrib/gtwvg/wvgwin.c b/harbour/contrib/gtwvg/wvgwin.c index faa5b536b2..4f983d2387 100644 --- a/harbour/contrib/gtwvg/wvgwin.c +++ b/harbour/contrib/gtwvg/wvgwin.c @@ -120,21 +120,23 @@ static HINSTANCE wvg_hInstance( void ) HB_FUNC( WVG_SENDMESSAGE ) { - LPTSTR cText = HB_ISBYREF( 4 ) ? HB_TCHAR_CONVTO( hb_parcx( 4 ) ) : NULL; + LPTSTR cText = HB_ISCHAR( 4 ) ? HB_TCHAR_CONVTO( hb_parcx( 4 ) ) : NULL; hb_retnl( ( HB_ULONG ) SendMessage( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( UINT ) hb_parni( 2 ), ( ! HB_ISNUM( 3 ) ? 0 : ( WPARAM ) hb_parnint( 3 ) ), - ( HB_ISNIL( 4 ) ? 0 : ( cText ? ( LPARAM ) ( LPSTR ) cText : - ( HB_ISCHAR( 4 ) ? ( LPARAM ) ( LPSTR ) hb_parc( 4 ) : - ( LPARAM ) hb_parnint( 4 ) ) ) ) ) + ( HB_ISNIL( 4 ) ? 0 : ( cText ? ( LPARAM )( LPSTR ) cText : + ( LPARAM ) hb_parnint( 4 ) ) ) ) ); if( cText ) { - char * szText = HB_TCHAR_CONVFROM( cText ); - hb_storc( szText, 4 ); - HB_TCHAR_FREE( szText ); + if( HB_ISBYREF( 4 ) ) + { + char * szText = HB_TCHAR_CONVFROM( cText ); + hb_storc( szText, 4 ); + HB_TCHAR_FREE( szText ); + } HB_TCHAR_FREE( cText ); } } diff --git a/harbour/contrib/gtwvg/wvtwin.ch b/harbour/contrib/gtwvg/wvtwin.ch index 8693c4acd2..b27c146dc4 100644 --- a/harbour/contrib/gtwvg/wvtwin.ch +++ b/harbour/contrib/gtwvg/wvtwin.ch @@ -6,7 +6,7 @@ * Harbour Project source code: * Header file for the WVT*Classes * - * Copyright 2004 Pritpal Bedi + * Copyright 2004-2011 Pritpal Bedi * www - http://www.xharbour.org http://harbour-project.org * * This program is free software; you can redistribute it and/or modify @@ -212,6 +212,9 @@ #define TVN_FIRST (0-400) #define HDM_FIRST 0x1200 // Header messages #define TCM_FIRST 0x1300 // Tab control messages +#define CCM_SETBKCOLOR 8193 +/*----------------------------------------------------------------------*/ + /*----------------------------------------------------------------------*/ // // Menu Manipulation Constants @@ -2138,6 +2141,22 @@ #define SWP_NOOWNERZORDER 0x0200 /* Don't do owner Z ordering */ #define SWP_NOSENDCHANGING 0x0400 /* Don't send WM_WINDOWPOSCHANGING */ +/*----------------------------------------------------------------------*/ + +#define PBM_SETRANGE (WM_USER+1) +#define PBM_SETPOS (WM_USER+2) +#define PBM_DELTAPOS (WM_USER+3) +#define PBM_SETSTEP (WM_USER+4) +#define PBM_STEPIT (WM_USER+5) +#define PBM_SETRANGE32 1030 +#define PBM_GETRANGE 1031 +#define PBM_GETPOS 1032 +#define PBM_SETBARCOLOR 1033 +#define PBM_SETBKCOLOR CCM_SETBKCOLOR + +#define PBS_SMOOTH 1 +#define PBS_VERTICAL 4 + /*----------------------------------------------------------------------*/ #endif /*----------------------------------------------------------------------*/