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 ?
Moving the dialog
- Antonio Linares
- Site Admin
- Posts: 42513
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 73 times
- Contact:
Re: Moving the dialog
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).
xBrowse is located on this TDialog (about 90% of the TDialog area).
- Antonio Linares
- Site Admin
- Posts: 42513
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 73 times
- Contact:
Re: Moving the dialog
that should not slow down the painting...
Is the xbrowse very complex ? I mean the data you show, calculations, etc
Is the xbrowse very complex ? I mean the data you show, calculations, etc
Re: Moving the dialog
No, xBrowser is simple - array, 10000 rows, 20 columns (if the xBrowser is small, everything is fine)
- Antonio Linares
- Site Admin
- Posts: 42513
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 73 times
- Contact:
Re: Moving the dialog
> if the xBrowser is small, everything is fine
what do you mean with "small" ?
what do you mean with "small" ?
Re: Moving the dialog
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 ?
2. How can I find out that the window update is caused by moving it to the screen ?
- Antonio Linares
- Site Admin
- Posts: 42513
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 73 times
- Contact:
Re: Moving the dialog
Dear Yuri,
when a window, dialog or control is painted, FWH evals oWnd:bPainted if defined from METHOD Paint() CLASS TWindow
::cPS is initialized from METHOD _BeginPaint() and contains a PAINTSTRUCT:
https://learn.microsoft.com/en-us/windo ... aintstruct
in such structure you have the area which is going to be updated
when a window, dialog or control is painted, FWH evals oWnd:bPainted if defined from METHOD Paint() CLASS TWindow
Code: Select all | Expand
if ValType( ::bPainted ) == "B"
uVal = Eval( ::bPainted, ::hDC, ::cPS, Self )
endif
https://learn.microsoft.com/en-us/windo ... aintstruct
in such structure you have the area which is going to be updated
Re: Moving the dialog
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
pulling the window out from behind the screen. I needed an understanding of when to execute this block of code and when not to