From 1bb24af967d4c9e5c82cf9b581ed19bbbfe62c95 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Fri, 12 Dec 2008 20:04:10 +0000 Subject: [PATCH] 2008-12-12 12:10 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/gtwvg/wvtwin.ch + Added more constants. * harbour/contrib/gtwvg/wvgcrt.prg * harbour/contrib/gtwvg/wvgdlg.prg * harbour/contrib/gtwvg/wvgwnd.prg * harbour/contrib/gtwvg/wvgsysw.prg ! Fixed some variable usages. Sorry for reckless uplod a couple of hours before. --- harbour/ChangeLog | 9 +++++++++ harbour/contrib/gtwvg/wvgcrt.prg | 7 ++++--- harbour/contrib/gtwvg/wvgdlg.prg | 6 +++--- harbour/contrib/gtwvg/wvgsysw.prg | 6 +++++- harbour/contrib/gtwvg/wvgwnd.prg | 6 +----- harbour/contrib/gtwvg/wvtwin.ch | 22 ++++++++++++++++++++++ 6 files changed, 44 insertions(+), 12 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 469f3fec10..a8db74b45c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,15 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-12-12 12:10 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * harbour/contrib/gtwvg/wvtwin.ch + + Added more constants. + * harbour/contrib/gtwvg/wvgcrt.prg + * harbour/contrib/gtwvg/wvgdlg.prg + * harbour/contrib/gtwvg/wvgwnd.prg + * harbour/contrib/gtwvg/wvgsysw.prg + ! Fixed some variable usages. Sorry for reckless uplod a couple of hours before. + 2008-12-12 10:06 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/gtwvg/makefile * harbour/contrib/gtwvg/common.mak diff --git a/harbour/contrib/gtwvg/wvgcrt.prg b/harbour/contrib/gtwvg/wvgcrt.prg index cf49856c86..94828deeff 100644 --- a/harbour/contrib/gtwvg/wvgcrt.prg +++ b/harbour/contrib/gtwvg/wvgcrt.prg @@ -551,17 +551,18 @@ METHOD setFontCompoundName() CLASS WvgCrt //----------------------------------------------------------------------// METHOD setFrameState( nState ) CLASS WvgCrt + Local lSuccess := .f. DO CASE CASE nState == WVGDLG_FRAMESTAT_MINIMIZED - ::sendMessage( WM_SYSCOMMAND, SC_SHOWMINIMIZED, 0 ) + lSuccess := ::sendMessage( WM_SYSCOMMAND, SC_MINIMIZE, 0 ) CASE nState == WVGDLG_FRAMESTAT_MAXIMIZED - ::sendMessage( WM_SYSCOMMAND, SC_SHOWMAXIMIZED, 0 ) + lSuccess := ::sendMessage( WM_SYSCOMMAND, SC_MAXIMIZE, 0 ) CASE nState == WVGDLG_FRAMESTAT_NORMALIZED - ::sendMessage( WM_SYSCOMMAND, SC_SHOWNORMAL, 0 ) + lSuccess := ::sendMessage( WM_SYSCOMMAND, SC_RESTORE, 0 ) ENDCASE diff --git a/harbour/contrib/gtwvg/wvgdlg.prg b/harbour/contrib/gtwvg/wvgdlg.prg index 8be9af1b67..d9fbad7ec4 100644 --- a/harbour/contrib/gtwvg/wvgdlg.prg +++ b/harbour/contrib/gtwvg/wvgdlg.prg @@ -193,13 +193,13 @@ METHOD setFrameState( nState ) CLASS WvgDialog DO CASE CASE nState == WVGDLG_FRAMESTAT_MINIMIZED - RETURN ( ::sendMessage( WM_SYSCOMMAND, SC_SHOWMINIMIZED, 0 ) <> 0 ) + RETURN ( ::sendMessage( WM_SYSCOMMAND, SC_MINIMIZE, 0 ) <> 0 ) CASE nState == WVGDLG_FRAMESTAT_MAXIMIZED - RETURN ( ::sendMessage( WM_SYSCOMMAND, SC_SHOWMAXIMIZED, 0 ) <> 0 ) + RETURN ( ::sendMessage( WM_SYSCOMMAND, SC_MAXIMIZE, 0 ) <> 0 ) CASE nState == WVGDLG_FRAMESTAT_NORMALIZED - RETURN ( ::sendMessage( WM_SYSCOMMAND, SC_SHOWNORMAL, 0 ) <> 0 ) + RETURN ( ::sendMessage( WM_SYSCOMMAND, SC_RESTORE, 0 ) <> 0 ) ENDCASE diff --git a/harbour/contrib/gtwvg/wvgsysw.prg b/harbour/contrib/gtwvg/wvgsysw.prg index b31df97f37..44abf48d5b 100644 --- a/harbour/contrib/gtwvg/wvgsysw.prg +++ b/harbour/contrib/gtwvg/wvgsysw.prg @@ -121,9 +121,11 @@ METHOD new( oParent, oOwner, aPos ) CLASS WvgSysWindow DEFAULT oParent TO ::oParent DEFAULT oOwner TO ::oOwner + DEFAULT aPos TO ::aPos ::oParent := oParent ::oOwner := oOwner + ::aPos := aPos ::WvgPartHandler:INIT( oParent, oOwner ) @@ -135,9 +137,11 @@ METHOD create( oParent, oOwner, aPos ) CLASS WvgSysWindow DEFAULT oParent TO ::oParent DEFAULT oOwner TO ::oOwner + DEFAULT aPos TO ::aPos ::oParent := oParent ::oOwner := oOwner + ::aPos := aPos ::WvgPartHandler:create( oParent, oOwner ) @@ -259,7 +263,7 @@ CLASS WvgFontDialog INHERIT WvgSysWindow DATA sl_activateReset ACCESS activateReset INLINE ::sl_activateReset - ASSIGN activateReset( bBlock ) INLINE ::sl_activateReset + ASSIGN activateReset( bBlock ) INLINE ::sl_activateReset := bBlock DATA hFont diff --git a/harbour/contrib/gtwvg/wvgwnd.prg b/harbour/contrib/gtwvg/wvgwnd.prg index 5c46af2344..5500d95544 100644 --- a/harbour/contrib/gtwvg/wvgwnd.prg +++ b/harbour/contrib/gtwvg/wvgwnd.prg @@ -448,8 +448,6 @@ METHOD setPos( aPos, lPaint ) CLASS WvgWindow SWITCH ::objType CASE objTypeCrt - hb_gtInfo( HB_GTI_SCREENWIDTH , aSize[ 1 ] ) - hb_gtInfo( HB_GTI_SCREENHEIGHT, aSize[ 2 ] ) exit OTHERWISE @@ -472,8 +470,6 @@ METHOD setPosAndSize( aPos, aSize, lPaint ) CLASS WvgWindow SWITCH ::objType CASE objTypeCrt - hb_gtInfo( HB_GTI_SCREENWIDTH , aSize[ 1 ] ) - hb_gtInfo( HB_GTI_SCREENHEIGHT, aSize[ 2 ] ) exit OTHERWISE @@ -556,7 +552,7 @@ METHOD setFontCompoundName( xFont ) CLASS WvgWindow LOCAL cOldFont, s, n, cAttr := '', nPoint := 0, cFace := '', cFont LOCAL aAttr := { 'normal','italic','bold' } - cOlfFont := ::fnt_COMMPOUNDNAME + cOldFont := ::fnt_COMMPOUNDNAME IF hb_isNumeric( cFont ) diff --git a/harbour/contrib/gtwvg/wvtwin.ch b/harbour/contrib/gtwvg/wvtwin.ch index 72d1b82e23..265337c562 100644 --- a/harbour/contrib/gtwvg/wvtwin.ch +++ b/harbour/contrib/gtwvg/wvtwin.ch @@ -542,6 +542,28 @@ #define WS_EX_NOACTIVATE 134217728 // 0x08000000L //-------------------------------------------------------------------// + +#define SC_SIZE 61440 // 0xF000 +#define SC_MOVE 61456 // 0xF010 +#define SC_MINIMIZE 61472 // 0xF020 +#define SC_MAXIMIZE 61488 // 0xF030 +#define SC_NEXTWINDOW 61504 // 0xF040 +#define SC_PREVWINDOW 61520 // 0xF050 +#define SC_CLOSE 61536 // 0xF060 +#define SC_VSCROLL 61552 // 0xF070 +#define SC_HSCROLL 61568 // 0xF080 +#define SC_MOUSEMENU 61584 // 0xF090 +#define SC_KEYMENU 61696 // 0xF100 +#define SC_ARRANGE 61712 // 0xF110 +#define SC_RESTORE 61728 // 0xF120 +#define SC_TASKLIST 61744 // 0xF130 +#define SC_SCREENSAVE 61760 // 0xF140 +#define SC_HOTKEY 61776 // 0xF150 +#define SC_DEFAULT 61792 // 0xF160 +#define SC_MONITORPOWER 61808 // 0xF170 +#define SC_CONTEXTHELP 61824 // 0xF180 +#define SC_SEPARATOR 61455 // 0xF00F + //-------------------------------------------------------------------// /* * Dialog styles