2011-12-10 12:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/gtwvg/gtwvg.c
* contrib/gtwvg/wvgtoolb.prg
* contrib/gtwvg/wvgtreev.prg
* contrib/gtwvg/wvgwin.c
! Fixed: some focussing issues.
For controls spread over GT console it is important to
set the input focus onto console window instead of child
window to execute defined action.
* contrib/gtwvg/tests/wvgtbrowser.prg
! Minor.
This commit is contained in:
@@ -16,6 +16,18 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-12-10 12:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/gtwvg/gtwvg.c
|
||||
* contrib/gtwvg/wvgtoolb.prg
|
||||
* contrib/gtwvg/wvgtreev.prg
|
||||
* contrib/gtwvg/wvgwin.c
|
||||
! Fixed: some focussing issues.
|
||||
For controls spread over GT console it is important to
|
||||
set the input focus onto console window instead of child
|
||||
window to execute defined action.
|
||||
* contrib/gtwvg/tests/wvgtbrowser.prg
|
||||
! Minor.
|
||||
|
||||
2011-12-08 12:36 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/gtwvg/wvgwin.c
|
||||
* Optimized: string handelling.
|
||||
|
||||
@@ -983,6 +983,7 @@ static HB_BOOL hb_gt_wvt_FitSizeRows( PHB_GTWVT pWVT )
|
||||
static void hb_gt_wvt_Maximize( PHB_GTWVT pWVT )
|
||||
{
|
||||
pWVT->bMaximized = HB_TRUE;
|
||||
SetFocus( pWVT->hWnd );
|
||||
hb_gt_wvt_FitSizeRows( pWVT );
|
||||
|
||||
/* Disable "maximize" button */
|
||||
@@ -2204,6 +2205,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
|
||||
ShowWindow( pWVT->hWnd, SW_NORMAL );
|
||||
}
|
||||
pWVT->bResizing = HB_TRUE;
|
||||
SetFocus( hWnd );
|
||||
return 0;
|
||||
|
||||
case WM_EXITSIZEMOVE:
|
||||
|
||||
@@ -243,16 +243,14 @@ STATIC FUNCTION BrwShowColumn( oBrw, cHeading )
|
||||
IF i < nCur
|
||||
FOR j := nCur-1 TO i STEP -1
|
||||
oBrw:left()
|
||||
oBrw:refreshCurrent()
|
||||
oBrw:forceStable()
|
||||
NEXT
|
||||
ELSEIF i > nCur
|
||||
FOR j := nCur+1 TO i
|
||||
oBrw:right()
|
||||
oBrw:refreshCurrent()
|
||||
oBrw:forceStable()
|
||||
NEXT
|
||||
ENDIF
|
||||
oBrw:refreshCurrent()
|
||||
oBrw:forceStable()
|
||||
|
||||
RETURN NIL
|
||||
|
||||
|
||||
@@ -204,8 +204,6 @@ METHOD WvgToolBar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
METHOD WvgToolBar:handleEvent( nMessage, aNM )
|
||||
LOCAL nObj, aNMMouse
|
||||
|
||||
hb_traceLog( " %s:handleEvent( %i )", __ObjGetClsName( self ), nMessage )
|
||||
|
||||
SWITCH nMessage
|
||||
|
||||
CASE HB_GTE_RESIZED
|
||||
@@ -226,6 +224,9 @@ METHOD WvgToolBar:handleEvent( nMessage, aNM )
|
||||
CASE aNMMouse[ NMH_code ] == NM_CLICK
|
||||
IF ( nObj := ascan( ::aItems, {|e_| e_[ 1 ] == aNMMouse[ NMH_dwItemSpec ] } ) ) > 0
|
||||
IF hb_isBlock( ::sl_lbClick )
|
||||
IF ::isParentCrt()
|
||||
::oParent:setFocus()
|
||||
ENDIF
|
||||
Eval( ::sl_lbClick, ::aItems[ nObj,2 ], NIL, Self )
|
||||
|
||||
ENDIF
|
||||
@@ -247,8 +248,6 @@ METHOD WvgToolBar:handleEvent( nMessage, aNM )
|
||||
METHOD WvgToolBar:destroy()
|
||||
LOCAL i, nItems
|
||||
|
||||
hb_traceLog( " %s:destroy()", __objGetClsName( self ) )
|
||||
|
||||
IF ( nItems := Len( ::aItems ) ) > 0
|
||||
FOR i := 1 TO nItems
|
||||
IF ::aItems[ i,2 ]:image <> NIL
|
||||
@@ -295,7 +294,7 @@ METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS
|
||||
HB_SYMBOL_UNUSED( cDLL )
|
||||
|
||||
/* Issue this at the begining of first item */
|
||||
IF !( ::lSized )
|
||||
IF ! ::lSized
|
||||
#if 0
|
||||
::SendToolbarMessage( TB_SETBUTTONWIDTH, ::buttonWidth, ::buttonWidth )
|
||||
#endif
|
||||
@@ -323,7 +322,7 @@ METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS
|
||||
|
||||
ENDCASE
|
||||
|
||||
IF !empty( pBitmap )
|
||||
IF ! empty( pBitmap )
|
||||
/* oBtn:image := pBitmap */
|
||||
|
||||
IF !empty( nMapRGB )
|
||||
|
||||
@@ -76,12 +76,6 @@
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __DBG_PARTS__
|
||||
#xtranslate hb_traceLog( [<x,...>] ) =>
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
CLASS WvgTreeView INHERIT WvgWindow, DataRef
|
||||
|
||||
DATA alwaysShowSelection INIT .F.
|
||||
@@ -217,7 +211,13 @@ METHOD WvgTreeView:handleEvent( nMessage, aNM )
|
||||
CASE aHdr[ NMH_code ] == TVN_SELCHANGED
|
||||
::getSelectionInfo( aNM[ 2 ] )
|
||||
IF hb_isBlock( ::sl_itemMarked )
|
||||
IF ::isParentCrt()
|
||||
::oParent:setFocus()
|
||||
ENDIF
|
||||
Eval( ::sl_itemMarked, ::oItemSelected, { 0,0,0,0 }, Self )
|
||||
IF ::isParentCrt()
|
||||
::setFocus()
|
||||
ENDIF
|
||||
ENDIF
|
||||
RETURN .t.
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ HB_FUNC( WVG_SENDMESSAGE )
|
||||
char * szText = HB_TCHAR_CONVFROM( cText );
|
||||
hb_storc( szText, 4 );
|
||||
HB_TCHAR_FREE( szText );
|
||||
}
|
||||
}
|
||||
HB_TCHAR_FREE( cText );
|
||||
}
|
||||
}
|
||||
@@ -378,7 +378,7 @@ HB_FUNC( WVG_LOADICON )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Win_LoadImage( ncImage, nSource ) -> hImage
|
||||
* Win_LoadImage( ncImage, nSource, nBmpOrIcon, nWidth, nHeight ) -> hImage
|
||||
* nSource == 0 ResourceIdByNumber
|
||||
* nSource == 1 ResourceIdByName
|
||||
* nSource == 2 ImageFromDiskFile
|
||||
@@ -391,19 +391,19 @@ HB_FUNC( WVG_LOADIMAGE )
|
||||
|
||||
switch( iSource )
|
||||
{
|
||||
case 0:
|
||||
case 0: /* Image from resource by numeric id */
|
||||
hImage = LoadBitmap( ( HINSTANCE ) wvg_hInstance(), MAKEINTRESOURCE( hb_parni( 1 ) ) );
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case 1: /* image from resource by name */
|
||||
hImage = LoadBitmap( ( HINSTANCE ) wvg_hInstance(), lpBuffer );
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 2: /* Image from disk file */
|
||||
if( HB_ISNUM( 3 ) && hb_parni( 3 ) == IMAGE_ICON )
|
||||
hImage = ( HICON ) LoadImage( ( HINSTANCE ) NULL, lpBuffer, IMAGE_ICON, 0, 0, LR_LOADFROMFILE );
|
||||
hImage = ( HICON ) LoadImage( ( HINSTANCE ) NULL, lpBuffer, IMAGE_ICON, hb_parni( 4 ), hb_parni( 5 ), LR_LOADFROMFILE );
|
||||
else
|
||||
hImage = ( HBITMAP ) LoadImage( ( HINSTANCE ) NULL, lpBuffer, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE );
|
||||
hImage = ( HBITMAP ) LoadImage( ( HINSTANCE ) NULL, lpBuffer, IMAGE_BITMAP, hb_parni( 4 ), hb_parni( 5 ), LR_LOADFROMFILE );
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user