Page 1 of 3

HMG.3.3.0 Patch 2 (32 and 64-bits)

Posted: Fri Jun 13, 2014 12:59 am
by srvet_claudio
Hi all.
This patch include the patch 1 and all previous sub-patches.
Unzip the patch in c:\hmg.3.3.0\ and execute BuildAllLib.bat and _BuildAllLib64.bat
Please you check for changes made.

The changes I made:
- Fixed Windows problem of overlap between ToolBar Bottom and StatusBar
- Button, CheckButton, ToolBarButton, ComboBox, Grid, Tab and Tree controls loaded images: BMP, GIF, TIF, JPG and PNG
- Button, CheckButton, ToolBarButton, ComboBox, Grid, Tab and Tree controls support the NOTRANSPARENT property
- Grid control support the NOTRANSPARENTHEADER property

- LOG demands at HPDF_INIT and Proper close tables in HTML --> http://hmgforum.com/viewtopic.php?p=34856#p34856
- New build.bat --> http://hmgforum.com/viewtopic.php?p=35031#p35031
- Fixed Numeric Textbox bug --> http://hmgforum.com/viewtopic.php?p=34890#p34890
- Fixed bug in Grid control build in 64-bits --> http://hmgforum.com/viewtopic.php?p=34946#p34946

- New function:

Code: Select all

IsWow64Process ( [ nProcessID ] ) --> return lBoolean
      - return TRUE  if a 32-bit application is running under 64-bit Windows (WOW64)
      - return FALSE if a 32-bit application is running under 32-bit Windows
      - return FALSE if a 64-bit application is running under 64-bit Windows
      - WOW64 is the x86 emulator that allows 32-bit Windows-based applications to running on 64-bit Windows

Re: HMG.3.3.0 Patch 2 (32 and 64-bits)

Posted: Fri Jun 13, 2014 1:40 am
by fchirico
Genial!!!!

Thanks,

Re: HMG.3.3.0 Patch 2 (32 and 64-bits)

Posted: Fri Jun 13, 2014 3:13 am
by meneale
Thanks Claudio,

:oops: unfortunately ever I include 'hmg_unicode.h', this is what i got:
hmg_unicode.h(91) Error F0029 Can't open #include file 'tchar.h'

Re: HMG.3.3.0 Patch 2 (32 and 64-bits)

Posted: Fri Jun 13, 2014 4:08 am
by srvet_claudio
meneale wrote:Thanks Claudio,

:oops: unfortunately ever I include 'hmg_unicode.h', this is what i got:
hmg_unicode.h(91) Error F0029 Can't open #include file 'tchar.h'
Please post a small example.

Re: HMG.3.3.0 Patch 2 (32 and 64-bits)

Posted: Fri Jun 13, 2014 4:43 am
by meneale
I can't post the whole code, because it's more than 4,000 rows, but the error occurs in hb_parnl, hb_retl, hb_retc.
Then i replaced to 'HMG_' instead of 'hb_', but it should to have 'hmg_unicode.h' included.
***********************************************************************************************
#pragma BEGINDUMP


#define _WIN32_WINNT 0x502
#include "windows.h"
#include "Uxtheme.h"
#include "hbapi.h"
#include <commctrl.h>
#include <wingdi.h>
#include <winuser.h>
#include "hbvm.h"

VOID *hDWMAPI = NULL;
typedef HRESULT (WINAPI * func_DwmExtendFrameIntoClientArea) (HWND, const MARGINS *);

BOOL HMG_DWMAPI ()
{
if (hDWMAPI == NULL)
hDWMAPI = LoadLibrary( "Dwmapi.dll" );
if (hDWMAPI)
return TRUE;
else
return FALSE;
}

// DwmExtendFrameIntoClientArea (hWnd, cxLeftWidth, cxRightWidth, cyTopHeight, cyBottomHeight)
HB_FUNC ( DWMEXTENDFRAMEINTOCLIENTAREA )
{
HWND hWnd = (HWND) hb_parnl (1);
HRESULT nRet = ( HRESULT ) NULL;
MARGINS MarInset;

MarInset.cxLeftWidth = (int) hb_parnl (2);
MarInset.cxRightWidth = (int) hb_parnl (3);
MarInset.cyTopHeight = (int) hb_parnl (4);
MarInset.cyBottomHeight = (int) hb_parnl (5);

if( HMG_DWMAPI() )
{
func_DwmExtendFrameIntoClientArea pDwmExtendFrameIntoClientArea = ( func_DwmExtendFrameIntoClientArea ) GetProcAddress( hDWMAPI, "DwmExtendFrameIntoClientArea" );
if( pDwmExtendFrameIntoClientArea )
nRet = ( HRESULT ) pDwmExtendFrameIntoClientArea ( hWnd, &MarInset );
}
hb_retl( ( nRet == S_OK ) );
}


HB_FUNC( DRAGACCEPTFILES )
{
DragAcceptFiles( ( HWND ) hb_parnl( 1 ), hb_parnl( 2 ) );
}

HB_FUNC( DRAGQUERYFILE )
{
HDROP hDrop = ( HDROP ) hb_parnl( 1 );
TCHAR lpBuffer[ MAX_PATH + 1 ];

DragQueryFile( hDrop, 0, lpBuffer, MAX_PATH );
hb_retc( lpBuffer );
}

HB_FUNC( DRAGFINISH )
{
DragFinish( (HDROP) hb_parnl( 1 ) );
}
#pragma ENDDUMP

Re: HMG.3.3.0 Patch 2 (32 and 64-bits)

Posted: Fri Jun 13, 2014 4:59 am
by srvet_claudio
meneale wrote:I can't post the whole code, because it's more than 4,000 rows, but the error occurs in hb_parnl, hb_retl, hb_retc.
Then i replaced to 'HMG_' instead of 'hb_', but it should to have 'hmg_unicode.h' included.
***********************************************************************************************
#pragma BEGINDUMP


#define _WIN32_WINNT 0x502
#include "windows.h"
#include "Uxtheme.h"
#include "hbapi.h"
#include <commctrl.h>
#include <wingdi.h>
#include <winuser.h>
#include "hbvm.h"

VOID *hDWMAPI = NULL;
typedef HRESULT (WINAPI * func_DwmExtendFrameIntoClientArea) (HWND, const MARGINS *);

BOOL HMG_DWMAPI ()
{
if (hDWMAPI == NULL)
hDWMAPI = LoadLibrary( "Dwmapi.dll" );
if (hDWMAPI)
return TRUE;
else
return FALSE;
}

// DwmExtendFrameIntoClientArea (hWnd, cxLeftWidth, cxRightWidth, cyTopHeight, cyBottomHeight)
HB_FUNC ( DWMEXTENDFRAMEINTOCLIENTAREA )
{
HWND hWnd = (HWND) hb_parnl (1);
HRESULT nRet = ( HRESULT ) NULL;
MARGINS MarInset;

MarInset.cxLeftWidth = (int) hb_parnl (2);
MarInset.cxRightWidth = (int) hb_parnl (3);
MarInset.cyTopHeight = (int) hb_parnl (4);
MarInset.cyBottomHeight = (int) hb_parnl (5);

if( HMG_DWMAPI() )
{
func_DwmExtendFrameIntoClientArea pDwmExtendFrameIntoClientArea = ( func_DwmExtendFrameIntoClientArea ) GetProcAddress( hDWMAPI, "DwmExtendFrameIntoClientArea" );
if( pDwmExtendFrameIntoClientArea )
nRet = ( HRESULT ) pDwmExtendFrameIntoClientArea ( hWnd, &MarInset );
}
hb_retl( ( nRet == S_OK ) );
}


HB_FUNC( DRAGACCEPTFILES )
{
DragAcceptFiles( ( HWND ) hb_parnl( 1 ), hb_parnl( 2 ) );
}

HB_FUNC( DRAGQUERYFILE )
{
HDROP hDrop = ( HDROP ) hb_parnl( 1 );
TCHAR lpBuffer[ MAX_PATH + 1 ];

DragQueryFile( hDrop, 0, lpBuffer, MAX_PATH );
hb_retc( lpBuffer );
}

HB_FUNC( DRAGFINISH )
{
DragFinish( (HDROP) hb_parnl( 1 ) );
}
#pragma ENDDUMP
Postea ese mismo codigo en C pero con el include "HMG_UNICODE.h" tal como esta en tu código.

Re: HMG.3.3.0 Patch 2 (32 and 64-bits)

Posted: Fri Jun 13, 2014 6:39 am
by serge_girard
Thanks Claudio !!!

Serge

Re: HMG.3.3.0 Patch 2 (32 and 64-bits)

Posted: Fri Jun 13, 2014 2:43 pm
by EduardoLuis
Hola Claudio:

Muchas gracias por tu nuevo upgrade, funciona fantástico.-
Al principio tuve errores con las tablas en el grid.- Pero ello se debió a una omisión de mi parte al reconstruir las librerias.- Las reconstrui unicamente en ANSI.- Reconstruidas ambas (ANSI y UNICODE) todo funcionó ok.-
Me queda pendiente una consulta: es necesario recompilar las librerias 64 bit aun cuando no utilice ese SO ?
Te mando un abrazo.-
Eduardo

Hi Claudio:

Thanks for your new upgrade, it works fantastic.-
Initially i have some error with tables on grid.- But latelly i discover i've omited rebuild all librarys.- First time i rebuild only ANSI one.- Rebuildt both (ANSI & UNICODO), all works fine.-
One doubt: it's necesary to rebuild 64 bit librarys no mather i don't use such SO ?
With regards.-
Eduardo

Re: HMG.3.3.0 Patch 2 (32 and 64-bits)

Posted: Fri Jun 13, 2014 2:52 pm
by srvet_claudio
EduardoLuis wrote: One doubt: it's necesary to rebuild 64 bit librarys no mather i don't use such SO ?
Is not necessary to rebuild all the libs, only is need rebuild the version (32 or 64 bits) that you use.

Re: HMG.3.3.0 Patch 2 (32 and 64-bits)

Posted: Fri Jun 13, 2014 4:50 pm
by EduardoLuis
Gracias Claudio

Te reporto un bug que encontré en HPDF.-

En el demo HPDF (carpeta HFCL , HMG_HPDF), si indicas el FONT y SIZE para un texto delimitado a un rectángulo, da error.-
Esto ya sucedía en las anteriores versiones (3.15, 3.20). Utilicé una fuente TTF denominada Kunstler.TTF.-
En todas las otras sintaxis de HPDF toma la fuente correctamente.-
Nuevamente gracias por tu gentileza.-
Un Abrazo Eduardo

Thanks Claudio

I report a bug on HPDF.-

In the demo HPDF (samples HFCL , HMG_HPDF folder), if you choose FONT & SIZE parameters for a delimited rectangle text, gives error.- This happends on older HMG versions (3.15, 3.20).- I use a TTF font, named Kunstler.-
On all other sintaxis of HMD_HPDF sample, works fine.-
Again, thanks.
With regards. Eduardo

CODE:

@ 230, 150 HPDFPRINT "This is a small paragraph to be printed inside a rectangular area justified." ;
to 250, 200 ;
FONT "Kunstler" SIZE 20 ;
CENTER