Page 1 of 1
Xbase++ :lockUpdate() -> Fivewin ?
Posted: Sat Nov 12, 2022 2:02 am
by Jimmy
hi,
when "resize" i use this under Xbase++
Code: Select all | Expand
PROCEDURE MyResize(aOldSize, aNewSize, oSelf)
...
oSelf:lockUpdate(.T.)
aChild := oSelf:Childlist()
FOR ii := 1 TO LEN(aChild)
// for all Controls
NEXT
oSelf:lockUpdate(.F.)
oSelf:invalidateRect()
RETURN
Question :
a.) how can i suppress Screen "Output" while resize Control under Fivewin
b.) under Xbase++ all Controls are "repaint" using invalidateRect() but under Fiverwin EACH Control need it
---
i do have search for "LockWindowUpdate" but not found under Fivewin
https://learn.microsoft.com/en-us/windo ... ndowupdate
i use this under HMG
Code: Select all | Expand
#include "DLL.CH"
#define DLL_STDCALL 0x20
STATIC PROCEDURE DoResize( oMain, ...)
...
DLLCall( "user32.dll", DLL_STDCALL, "LockWindowUpdate", oMain:Hwnd )
// resize Controls
DLLCall( "user32.dll", DLL_STDCALL, "LockWindowUpdate", 0 )
oMain:refresh()
Re: Xbase++ :lockUpdate() -> Fivewin ?
Posted: Sat Nov 12, 2022 7:06 am
by Antonio Linares
Dear Jimmy,
Code: Select all | Expand
HB_FUNC( LOCKWINDOWUPDATE )
{
hb_retl( LockWindowUpdate( ( HWND ) hb_parnll( 1 ) );
}
Re: Xbase++ :lockUpdate() -> Fivewin ?
Posted: Sun Nov 13, 2022 6:26 am
by Jimmy
hi Antonio,
thx
typo, must be
Code: Select all | Expand
hb_retl( LockWindowUpdate( ( HWND ) hb_parnll( 1 ) ) ) ;
Re: Xbase++ :lockUpdate() -> Fivewin ?
Posted: Sun Nov 13, 2022 8:11 pm
by Antonio Linares
Dear Jimmy,
you are right
thanks!
Re: Xbase++ :lockUpdate() -> Fivewin ?
Posted: Thu Nov 02, 2023 3:42 pm
by karinha
Duda: para que sirve este comando LOCKWINDOWUPDATE() ?
Gracias.
Regards, saludos.
Re: Xbase++ :lockUpdate() -> Fivewin ?
Posted: Thu Nov 02, 2023 6:10 pm
by Jimmy
hi,
have a look at
https://learn.microsoft.com/de-de/windo ... ndowupdate
i use it e,g, when "re-size" a Window and do NOT want "paint" until all is finish
Re: Xbase++ :lockUpdate() -> Fivewin ?
Posted: Fri Nov 03, 2023 9:07 am
by Antonio Linares
Nuevo método en la Clase TWindow de FWH:
METHOD LockUpdate( lOnOff ) INLINE LockWindowUpdate( If( Empty( lOnOff ) .or. lOnOff, ::hWnd, 0 ) )
Code: Select all | Expand
HB_FUNC( LOCKWINDOWUPDATE )
{
hb_retl( LockWindowUpdate( ( HWND ) hb_parnll( 1 ) ) );
}
Re: Xbase++ :lockUpdate() -> Fivewin ?
Posted: Fri Nov 03, 2023 10:04 am
by Antonio Linares
This seems a simpler version: Jimmy could you please try it with your code ? No need to supply a parameter
METHOD LockUpdate() INLINE LockWindowUpdate( ::hWnd )
Code: Select all | Expand
HB_FUNC( LOCKWINDOWUPDATE )
{
if( ! LockWindowUpdate( ( HWND ) hb_parnll( 1 ) ) )
LockWindowUpdate( ( HWND ) 0 );
}
https://learn.microsoft.com/en-us/windo ... ndowupdate
Re: Xbase++ :lockUpdate() -> Fivewin ?
Posted: Fri Nov 03, 2023 12:15 pm
by xmanuel
Antonio yo la dejaría como al principio pero usando hb_parptr:
Code: Select all | Expand
HB_FUNC( LOCKWINDOWUPDATE )
{
hb_retl( LockWindowUpdate( ( HWND ) hb_parptr( 1 ) ) );
}
hb_parptr() devuelve NULL si no se pasa nada que exactamente. lo que se quiere.
Re: Xbase++ :lockUpdate() -> Fivewin ?
Posted: Sat Nov 04, 2023 3:37 pm
by Jimmy
hi Antonio,
i try to find HB_FUNC( LOCKWINDOWUPDATE ) but did not found it in my FWH Source ... hm
but i found it in "C" Files as "External" ... hm
so i try
but "no match" ... hm
---
in my FWH i have
Code: Select all | Expand
PROCEDURE DoDBFResize( oWnd ... )
LOCKWINDOWUPDATE( oWnd:Hwnd )
FOR ii := 1 TO nMax
oObj := aParts[ ii ]
oObj:SetSize( nPart, 48 )
oObj:SetPos( 0, nPart * ( ii - 2 ) )
NEXT
LOCKWINDOWUPDATE( 0 )
RETURN
which work as expect
Re: Xbase++ :lockUpdate() -> Fivewin ?
Posted: Sat Nov 04, 2023 5:04 pm
by Antonio Linares
Dear Jimmy,
using :
Adding this to Class TWindow: METHOD LockUpdate() INLINE LockWindowUpdate( ::hWnd )
Code: Select all | Expand
HB_FUNC( LOCKWINDOWUPDATE )
{
if( ! LockWindowUpdate( ( HWND ) hb_parnll( 1 ) ) )
LockWindowUpdate( ( HWND ) 0 );
}
Your code could be changed this way:
Code: Select all | Expand
PROCEDURE DoDBFResize( oWnd ... )
oWnd:LockUpdate()
FOR ii := 1 TO nMax
oObj := aParts[ ii ]
oObj:SetSize( nPart, 48 )
oObj:SetPos( 0, nPart * ( ii - 2 ) )
NEXT
oWnd:LockUpdate()
RETURN