2009-02-25 18:57 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* harbour/contrib/gtwvg/gtwvg.c
  * harbour/contrib/gtwvg/wvgcrt.prg
  * harbour/contrib/gtwvg/wvgwnd.prg
    ! More types of consoles. Mainly modal windows implementation.
This commit is contained in:
Pritpal Bedi
2009-02-26 03:01:10 +00:00
parent 51c941326e
commit fa6220892b
4 changed files with 27 additions and 37 deletions

View File

@@ -8,6 +8,12 @@
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-02-25 18:57 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* harbour/contrib/gtwvg/gtwvg.c
* harbour/contrib/gtwvg/wvgcrt.prg
* harbour/contrib/gtwvg/wvgwnd.prg
! More types of consoles. Mainly modal windows implementation.
2009-02-25 15:35 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* harbour/contrib/hbwin/wapi_winuser.c
! Commented out WAPI_GETSCROLLBARINFO().

View File

@@ -1791,7 +1791,6 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
if( pWVT ) switch( message )
{
#if 1
case WM_HSCROLL:
{
PHB_ITEM pEvParams = hb_itemNew( NULL );
@@ -1818,7 +1817,6 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
hb_gt_wvt_FireEvent( pWVT, HB_GTE_VSCROLL, pEvParams );
return( 0 );
}
#endif
case WM_CREATE:
{
if( pWVT->pPP->iWndType == HB_WNDTYPE_CRT )
@@ -2173,34 +2171,6 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
return( iResult );
}
}
#if 0
case WM_HSCROLL:
{
PHB_ITEM pEvParams = hb_itemNew( NULL );
hb_arrayNew( pEvParams, 3 );
hb_arraySetNL( pEvParams, 1, ( HB_LONG ) LOWORD( wParam ) );
hb_arraySetNL( pEvParams, 2, ( HB_LONG ) HIWORD( wParam ) );
hb_arraySetNInt( pEvParams, 3, ( HB_LONG ) ( HB_PTRDIFF ) lParam );
hb_gt_wvt_FireEvent( pWVT, HB_GTE_HSCROLL, pEvParams );
return( 0 );
}
case WM_VSCROLL:
{
PHB_ITEM pEvParams = hb_itemNew( NULL );
hb_arrayNew( pEvParams, 3 );
hb_arraySetNL( pEvParams, 1, ( HB_LONG ) LOWORD( wParam ) );
hb_arraySetNL( pEvParams, 2, ( HB_LONG ) HIWORD( wParam ) );
hb_arraySetNInt( pEvParams, 3, ( HB_LONG ) ( HB_PTRDIFF ) lParam );
hb_gt_wvt_FireEvent( pWVT, HB_GTE_VSCROLL, pEvParams );
return( 0 );
}
#endif
}
return DefWindowProc( hWnd, message, wParam, lParam );
@@ -2314,6 +2284,9 @@ static HWND hb_gt_wvt_CreateWindow( PHB_GTWVT pWVT )
pWVT->pPP->y = pt.y;
bByConf = TRUE;
//WS_THICKFRAME|WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX;
pWVT->pPP->style = WS_POPUP|WS_CAPTION|WS_DLGFRAME;
}
}
}
@@ -3023,14 +2996,16 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
if( pWVT->hWnd )
{
#if (defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_OS_WIN_CE)) || defined(__DMC__)) && !defined(HB_ARCH_64BIT)
LONG style;
LONG style = GetWindowLong( pWVT->hWnd, GWL_STYLE );
#else
LONG_PTR style;
LONG_PTR style = GetWindowLongPtr( pWVT->hWnd, GWL_STYLE );
#endif
if( pWVT->bResizable )
style = WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_THICKFRAME;
//style = WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_THICKFRAME;
style = style | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_THICKFRAME;
else
style = WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_BORDER;
//style = WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_BORDER;
style = ( style & ~( WS_MAXIMIZEBOX | WS_THICKFRAME ) );
#if (defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_OS_WIN_CE)) || defined(__DMC__)) && !defined(HB_ARCH_64BIT)
SetWindowLong( pWVT->hWnd, GWL_STYLE, style );

View File

@@ -241,7 +241,7 @@ EXPORTED:
// HARBOUR implementation
DATA resizable INIT .t.
DATA resizeMode INIT HB_GTI_RESIZEMODE_FONT
DATA style INIT WS_OVERLAPPEDWINDOW
DATA style INIT (WS_OVERLAPPED + WS_CAPTION + WS_SYSMENU + WS_SIZEBOX + WS_MINIMIZEBOX + WS_MAXIMIZEBOX)
DATA exStyle INIT 0
DATA lModal INIT .f.
DATA pGTp
@@ -321,6 +321,14 @@ METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgCr
::pGT := hb_gtSelect()
endif
if ::lModal
::style := WS_POPUP + WS_CAPTION
if !( ::resizable )
//::exStyle := WS_EX_DLGMODALFRAME
//::style += WS_DLGFRAME
endif
endif
hb_gtInfo( HB_GTI_PRESPARAMS, { ::exStyle, ::style, ::aPos[ 1 ], ::aPos[ 2 ], ;
::maxRow+1, ::maxCol+1, ::pGTp, .F., lRowCol, HB_WNDTYPE_CRT } )
hb_gtInfo( HB_GTI_SETFONT, { ::fontName, ::fontHeight, ::fontWidth } )
@@ -345,7 +353,7 @@ METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgCr
endif
if ::lModal
//hb_gtInfo( HB_GTI_DISABLE, ::pGTp )
hb_gtInfo( HB_GTI_DISABLE, ::pGTp )
endif
if ::visible

View File

@@ -1328,7 +1328,7 @@ METHOD ControlWndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgWindow
CASE WM_CAPTURECHANGED
EXIT
#if 0
CASE WM_MOUSEMOVE
IF ::objType == objTypeScrollBar
IF !( ::lTracking )
@@ -1354,6 +1354,7 @@ METHOD ControlWndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgWindow
ENDIF
ENDIF
EXIT
#endif
END
RETURN Win_CallWindowProc( ::nOldProc, hWnd, nMessage, nwParam, nlParam )