2019-01-11 13:52 UTC-0800 Pritpal Bedi (bedipritpal/at/hotmail.com)

* contrib/gtwvg/wnd.prg
  * contrib/gtwvg/activex.prg
    ! modified to honor plain hWnd as container window instead of an
      WvgWnd() object.
  * contrib/gtwvg/gtwvgd.c
    + added - HB_GTI_VIEWPORTHEIGHT and HB_GTI_VIEWPORTWIDTH handelling.
    ! Pacified some warnings reported by BCC-720.
  * contrib/gtwvg/wvgcore.c
  * contrib/gtwvg/wvgcuig.c
    ! Pacified some warnings reported by BCC-720.
This commit is contained in:
bedipritpal
2019-01-11 14:02:42 -08:00
parent 4c35339898
commit 2f24768cdb
6 changed files with 42 additions and 19 deletions

View File

@@ -7,6 +7,18 @@
Entries may not always be in chronological/commit order.
See license at the end of file. */
2019-01-11 13:52 UTC-0800 Pritpal Bedi (bedipritpal/at/hotmail.com)
* contrib/gtwvg/wnd.prg
* contrib/gtwvg/activex.prg
! modified to honor plain hWnd as container window instead of an
WvgWnd() object.
* contrib/gtwvg/gtwvgd.c
+ added - HB_GTI_VIEWPORTHEIGHT and HB_GTI_VIEWPORTWIDTH handelling.
! Pacified some warnings reported by BCC-720.
* contrib/gtwvg/wvgcore.c
* contrib/gtwvg/wvgcuig.c
! Pacified some warnings reported by BCC-720.
2018-12-31 15:32 UTC+0100 Maurizio la Cecilia (m.lacecilia/at/gmail.com)
* contrib/hbssl/hbssl.hbc
* made compliant also for Windows static builds

View File

@@ -120,27 +120,27 @@ METHOD WvgActiveXControl:Create( oParent, oOwner, aPos, aSize, aPresParams, lVis
LOCAL hObj, hWnd
::WvgWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::WvgWindow:create( @oParent, @oOwner, aPos, aSize, aPresParams, lVisible )
__defaultNIL( @cCLSID, ::CLSID )
__defaultNIL( @cLicense, ::license )
::CLSID := cCLSID
::license := cLicense
::hContainer := ::oParent:getHWND()
::hContainer := iif( HB_ISOBJECT( ::oParent ), ::oParent:getHWND(), ::oParent )
IF ! HB_ISNUMERIC( ::hContainer ) .OR. ! HB_ISSTRING( ::CLSID )
RETURN NIL
ENDIF
::hWnd := NIL
::nID := ::oParent:GetControlId()
::nID := iif( HB_ISOBJECT( ::oParent ), ::oParent:GetControlId(), ::getControlID() )
::oOLE := win_oleAuto()
win_axInit()
hWnd := wapi_CreateWindowEx( ::exStyle, "AtlAxWin", ::CLSID, ::style, ::aPos[ 1 ], ::aPos[ 2 ], ;
::aSize[ 1 ], ::aSize[ 2 ], win_N2P( ::hContainer ), 0 )
::aSize[ 1 ], ::aSize[ 2 ], win_N2P( ::hContainer ), 0, NIL, NIL )
IF Empty( hWnd )
RETURN NIL
ENDIF
@@ -162,13 +162,16 @@ METHOD WvgActiveXControl:Create( oParent, oOwner, aPos, aSize, aPresParams, lVis
::SetWindowProcCallback() /* Is this needed to catch windowing events ? - NO */
#endif
::oParent:addChild( Self )
IF HB_ISOBJECT( ::oParent )
::oParent:addChild( Self )
ENDIF
::setPosAndSize()
IF ::visible
::show()
ELSE
::hide()
ENDIF
::setPosAndSize()
IF ::isParentCrt()
::oParent:setFocus()
ENDIF
@@ -225,14 +228,15 @@ METHOD WvgActiveXControl:OnError()
METHOD PROCEDURE WvgActiveXControl:Destroy()
IF ! Empty( ::oOLE:__hObj )
IF wapi_IsWindow( ::pWnd )
wapi_DestroyWindow( ::pWnd )
IF ! Empty( ::oOLE )
IF ! Empty( ::oOLE:__hObj )
IF wapi_IsWindow( ::pWnd )
wapi_DestroyWindow( ::pWnd )
ENDIF
::oOle := NIL
::hWnd := NIL
ENDIF
::oOle := NIL
::hWnd := NIL
ENDIF
RETURN
METHOD WvgActiveXControl:mapEvent( nEvent, bBlock )

View File

@@ -3377,10 +3377,12 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
pInfo->pResult = hb_itemPutNInt( pInfo->pResult, ( HB_PTRUINT ) pWVT->hIcon );
break;
case HB_GTI_VIEWPORTWIDTH:
case HB_GTI_VIEWMAXWIDTH:
pInfo->pResult = hb_itemPutNI( pInfo->pResult, pWVT->COLS );
break;
case HB_GTI_VIEWPORTHEIGHT:
case HB_GTI_VIEWMAXHEIGHT:
pInfo->pResult = hb_itemPutNI( pInfo->pResult, pWVT->ROWS );
break;
@@ -3664,8 +3666,8 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
case HB_GTI_SETPOS_ROWCOL:
if( pWVT->hWnd )
{
int i1 = -1;
int i2 = -1;
int i1, i2;
RECT rect = { 0, 0, 0, 0 };
GetWindowRect( pWVT->hWnd, &rect );

View File

@@ -245,7 +245,7 @@ CREATE CLASS WvgWindow INHERIT WvgPartHandler
PROTECTED:
METHOD getPosAndSize( aPs, aSz )
METHOD isParentCrt() INLINE ::oParent:objType == objTypeCrt
METHOD isParentCrt() INLINE ( iif( HB_ISOBJECT( ::oParent ), ::oParent:objType == objTypeCrt, .F. ) )
METHOD rePosition()
METHOD createControl()

View File

@@ -194,7 +194,7 @@ HB_BOOL hb_wvt_gtRenderPicture( int x, int y, int wd, int ht, IPicture * iPictur
PHB_GTWVT _s = hb_wvt_gtGetWVT();
LONG lWidth, lHeight;
int xe, ye, iWd = 0, iHt = 0;
int xe, ye;
HRGN hrgn1;
POINT lpp = { 0, 0 };
HB_BOOL bResult = HB_FALSE;
@@ -207,6 +207,8 @@ HB_BOOL hb_wvt_gtRenderPicture( int x, int y, int wd, int ht, IPicture * iPictur
if( bDoNotScale )
{
int iWd, iHt;
if( lHeight > lWidth )
{
iWd = ( int ) ( ( double ) ht * lWidth / lHeight );
@@ -506,7 +508,7 @@ HB_BOOL hb_wvt_DrawImage( HDC hdc, int x, int y, int wd, int ht, LPCTSTR lpImage
DWORD nFileSize;
DWORD nReadByte;
LONG lWidth, lHeight;
int xe, ye, iWd = 0, iHt = 0;
int xe, ye;
HRGN hrgn1;
POINT lpp = { 0, 0 };
HB_BOOL bResult = HB_FALSE;
@@ -539,6 +541,8 @@ HB_BOOL hb_wvt_DrawImage( HDC hdc, int x, int y, int wd, int ht, LPCTSTR lpImage
if( bDoNotScale )
{
int iWd, iHt;
if( lHeight > lWidth )
{
iWd = ( int ) ( ( double ) ht * lWidth / lHeight );

View File

@@ -732,7 +732,6 @@ static void hb_wvg_LabelEx2( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop
hOldFont = ( HFONT ) SelectObject( pWVT->hdc, gObj->hFont );
x = iLeft;
y = iTop;
switch( gObj->iAlign )
{
@@ -1463,7 +1462,7 @@ static void hb_wvg_RenderPicture( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int
{
#if ! defined( HB_OS_WIN_CE )
LONG lWidth, lHeight;
int xe, ye, iWd = 0, iHt = 0, x, y, wd, ht;
int xe, ye, x, y, wd, ht;
HRGN hrgn1;
POINT lpp = { 0, 0 };
@@ -1482,6 +1481,8 @@ static void hb_wvg_RenderPicture( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int
if( gObj->iData == 1 )
{
int iWd, iHt;
if( lHeight > lWidth )
{
iWd = ( int ) ( ( double ) ht * lWidth / lHeight );