FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Moving the dialog
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Moving the dialog
Posted: Sat Oct 21, 2023 06:40 PM
Hi,

If, when moving the dialog with the mouse, part of this dialog turned out to be a screen,
then returning the dialog to the screen will be associated with significant delays (depending on the number of controls on the dialog).
I understand that this is due to the constant call of the Refresh() method.
How do I make the Refresh() method work only when the left mouse button is not pressed ?
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Moving the dialog
Posted: Sat Oct 21, 2023 09:21 PM

How many controls do you use in the dialog ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Moving the dialog
Posted: Sun Oct 22, 2023 08:10 AM

For example, there is a main window (full screen). I open a TDialog (about 90% of the area of the main window).

xBrowse is located on this TDialog (about 90% of the TDialog area).

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Moving the dialog
Posted: Sun Oct 22, 2023 01:48 PM

that should not slow down the painting...

Is the xbrowse very complex ? I mean the data you show, calculations, etc

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Moving the dialog
Posted: Sun Oct 22, 2023 04:28 PM

No, xBrowser is simple - array, 10000 rows, 20 columns (if the xBrowser is small, everything is fine)

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Moving the dialog
Posted: Sun Oct 22, 2023 07:16 PM

> if the xBrowser is small, everything is fine

what do you mean with "small" ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Moving the dialog
Posted: Mon Oct 23, 2023 12:26 PM
  1. How can I find out that part of the window is shifted behind the screen ?

  2. How can I find out that the window update is caused by moving it to the screen ?

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Moving the dialog
Posted: Mon Oct 23, 2023 12:56 PM
Dear Yuri,

when a window, dialog or control is painted, FWH evals oWnd:bPainted if defined from METHOD Paint() CLASS TWindow
Code (fw): Select all Collapse
      if ValType( ::bPainted ) == "B"
         uVal = Eval( ::bPainted, ::hDC, ::cPS, Self )
      endif
::cPS is initialized from METHOD _BeginPaint() and contains a PAINTSTRUCT:
https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-paintstruct

in such structure you have the area which is going to be updated
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Moving the dialog
Posted: Mon Oct 23, 2023 01:24 PM

Thank you, Antonio! I'll try to figure it out. It was the code block :bPainted that caused delays when

pulling the window out from behind the screen. I needed an understanding of when to execute this block of code and when not to

Continue the discussion