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

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

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

Post 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
Attachments
HMG.3.3.0_patch2_(32 and 64-bits).rar
(864.54 KiB) Downloaded 832 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

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

Post by fchirico »

Genial!!!!

Thanks,
Saludos, Fernando Chirico.
User avatar
meneale
Posts: 51
Joined: Sat Jan 12, 2013 2:05 am
Location: Campinas -SP, Brasil

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

Post 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'
AMD Phenom II X6 1090T 3.2GHz (OverClock 3.9GHz) | Windows 8.1 Pro 64-bit
4GB DDR3 | GTX 550 Ti 1GB | MSI 880GMA-E35
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

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

Post 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.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
meneale
Posts: 51
Joined: Sat Jan 12, 2013 2:05 am
Location: Campinas -SP, Brasil

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

Post 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
AMD Phenom II X6 1090T 3.2GHz (OverClock 3.9GHz) | Windows 8.1 Pro 64-bit
4GB DDR3 | GTX 550 Ti 1GB | MSI 880GMA-E35
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

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

Post 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.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
serge_girard
Posts: 3158
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

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

Post by serge_girard »

Thanks Claudio !!!

Serge
There's nothing you can do that can't be done...
EduardoLuis
Posts: 682
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

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

Post 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
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

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

Post 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.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
EduardoLuis
Posts: 682
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

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

Post 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
Post Reply