Dialog controls are flickering when resized..
Re: Dialog controls are flickering when resized..
Dear Mr. Antonio,
In my recent sample above.. SAY, GET and GROUPBOX are flickering.
It is strange.
Regards,
Frances
In my recent sample above.. SAY, GET and GROUPBOX are flickering.
It is strange.
Regards,
Frances
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Dialog controls are flickering when resized..
Antonio,
Could you implement double-buffering in TControl so all the controls inherit it?
James
Could you implement double-buffering in TControl so all the controls inherit it?
James
Re: Dialog controls are flickering when resized..
Dear Mr. Antonio,
Can this be possible? any workaround I can start with?
Regards,
Frances
Can this be possible? any workaround I can start with?
Regards,
Frances
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Re: Dialog controls are flickering when resized..
Hi All,
A long time ago...
Today with FWH1804 (latest build), still struggling how redefined dialog (with its controls) not to flicker on MDI Child window...
When I resize the MDI Child Window... everything on it flickers...
Perhaps I am missing a new technique

A long time ago...
Today with FWH1804 (latest build), still struggling how redefined dialog (with its controls) not to flicker on MDI Child window...



When I resize the MDI Child Window... everything on it flickers...
Perhaps I am missing a new technique



Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
- Otto
- Posts: 6413
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 28 times
- Been thanked: 2 times
- Contact:
Re: Dialog controls are flickering when resized..
Hello Frances,
can you try to remove manifest for testing purpose.
Is it still flickering.
Thank you and best regards,
Otto
can you try to remove manifest for testing purpose.
Is it still flickering.
Thank you and best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: Dialog controls are flickering when resized..
fraxzi wrote:Dear All,
As with the above..
When I resize Dialog controls are flickering with backround gradient..Code: Select all | Expand
DEFINE DIALOG oDlg TRANSPARENT
...standard controls here.. say, get, folder, xbrowse...
oDlg:SetBrush( TBrush():New() )
ACTIVATE DIALOG oDlg NOWAIT;
ON PAINT uDialogGradient( hDC, oDlg, { { 1, RGB( 216, 230, 238 ), RGB( 103, 154, 194 ) } }, .F. )
....
FUNCTION uDialogGradient( hDC, oDlg, aGrad, lPos )
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aGrad, lPos )
ReleaseDC( hDC )
RETURN NIL
Any thoughts?
Regards,
Frances
First, let us handle the case of simple dialog.
Please run this sample. Try resizing the dialog and you will not find any flickering.
Code: Select all | Expand
#include "fivewin.ch"
function Main()
local oDlg, oBrw, oFont, oBrush
local aGet[ 3 ], aVar := { "Hello World ", 2345678, Date() }
USE CUSTOMER
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE BRUSH oBrush GRADIENT { { 1, RGB( 216, 230, 238 ), RGB( 103, 154, 194 ) } }
DEFINE DIALOG oDlg SIZE 800,600 PIXEL TRUEPIXEL FONT oFont BRUSH oBrush TRANSPARENT RESIZABLE
@ 20,20 GROUP TO 180,400 PIXEL OF oDlg
@ 40,40 SAY "Try Resizing this Dialog" SIZE 300,20 PIXEL OF oDlg
@ 70,40 GET aGet[ 1 ] VAR aVar[ 1 ] SIZE 300,24 PIXEL OF oDlg
@ 110,40 GET aGet[ 2 ] VAR aVar[ 2 ] SIZE 100,24 PIXEL OF oDlg
@ 140,40 GET aGet[ 3 ] VAR aVar[ 3 ] SIZE 100,24 PIXEL OF oDlg
@ 200,40 XBROWSE oBrw SIZE 400,200 PIXEL OF oDlg DATASOURCE "CUSTOMER" ;
AUTOCOLS CELL LINES NOBORDER
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
RELEASE BRUSH oBrush
return nil
Please let me know if you experience any flickering while resizing.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Dialog controls are flickering when resized..
You should not call uDialogGradient( hDC, oDlg, { { 1, RGB( 216, 230, 238 ), RGB( 103, 154, 194 ) } }, .F. ) in ON PAINT. Every change of size from dialog call ON PAINT and so every move from 1 pixel the function is called. -> And dialog is flickering!
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: Dialog controls are flickering when resized..
MDI
Groupbox does not flicker but transparency does not work well. Better to avoid group boxes here.
Code: Select all | Expand
#include "fivewin.ch"
function Main()
local oWnd, oBar
DEFINE WINDOW oWnd MDI
DEFINE BUTTONBAR oBar of oWnd 2007
DEFINE BUTTON OF oBar ACTION DialogOnMDIChild()
ACTIVATE WINDOW oWnd MAXIMIZED
return nil
function DialogOnMDIChild()
local oWnd, oDlg, oBrush, oFont, oGet
local cGet := 'themed apps'
DEFINE BRUSH oBrush GRADIENT { { 1, RGB( 216, 230, 238 ), RGB( 103, 154, 194 ) } }
DEFINE WINDOW oWnd MDICHILD OF WndMain() BRUSH oBrush
RELEASE BRUSH oBrush
ACTIVATE WINDOW oWnd ON INIT BuildDialog( oWnd )
return nil
function BuildDialog( oWnd )
local oDlg, oFont, oGet
local cGet := "Hello World "
DEFINE FONT oFont NAME "Verdana" SIZE 0, -16
DEFINE DIALOG oDlg RESOURCE 'DLG_CONTENT' OF oWnd FONT oFont
RELEASE FONT oFont
// REDEFINE GROUP ID 1001 OF oDlg TRANSPARENT
REDEFINE SAY ID 1003 OF oDlg TRANSPARENT
REDEFINE SAY ID 1004 OF oDlg TRANSPARENT
REDEFINE GET oGet VAR cGet ID 1002 OF oDlg UPDATE
ACTIVATE DIALOG oDlg NOWAIT ON INIT ( ChangeParent( oDlg, oWnd ) )
oDlg:End()
return nil
function ChangeParent( oDlg, oWnd )
local n
for n = 1 to Len( oDlg:aControls )
SetParent( oDlg:aControls[ n ]:hWnd, oWnd:hWnd )
AAdd( oWnd:aControls, oDlg:aControls[ n ] )
oDlg:aControls[ n ]:oWnd = oWnd
next
return nil
Groupbox does not flicker but transparency does not work well. Better to avoid group boxes here.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Dialog controls are flickering when resized..
Otto wrote:Hello Frances,
can you try to remove manifest for testing purpose.
Is it still flickering.
Thank you and best regards,
Otto
Hi Mr. Otto,
I removed and build the entire project.. The flickering the same with or without the my "WindowsXP.Manifest"..

Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Re: Dialog controls are flickering when resized..
First, let us handle the case of simple dialog.
Please run this sample. Try resizing the dialog and you will not find any flickering.Code: Select all | Expand
#include "fivewin.ch"
function Main()
local oDlg, oBrw, oFont, oBrush
local aGet[ 3 ], aVar := { "Hello World ", 2345678, Date() }
USE CUSTOMER
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE BRUSH oBrush GRADIENT { { 1, RGB( 216, 230, 238 ), RGB( 103, 154, 194 ) } }
DEFINE DIALOG oDlg SIZE 800,600 PIXEL TRUEPIXEL FONT oFont BRUSH oBrush TRANSPARENT RESIZABLE
@ 20,20 GROUP TO 180,400 PIXEL OF oDlg
@ 40,40 SAY "Try Resizing this Dialog" SIZE 300,20 PIXEL OF oDlg
@ 70,40 GET aGet[ 1 ] VAR aVar[ 1 ] SIZE 300,24 PIXEL OF oDlg
@ 110,40 GET aGet[ 2 ] VAR aVar[ 2 ] SIZE 100,24 PIXEL OF oDlg
@ 140,40 GET aGet[ 3 ] VAR aVar[ 3 ] SIZE 100,24 PIXEL OF oDlg
@ 200,40 XBROWSE oBrw SIZE 400,200 PIXEL OF oDlg DATASOURCE "CUSTOMER" ;
AUTOCOLS CELL LINES NOBORDER
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
RELEASE BRUSH oBrush
return nil
Please let me know if you experience any flickering while resizing.
Hi Mr. Rao,
No flickering at all.

Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Re: Dialog controls are flickering when resized..
Mr. Rao,
Massive flickering of objects occurs when resizing window with child redefined dialog.. even if object's parent changed from dialog to windows.

Massive flickering of objects occurs when resizing window with child redefined dialog.. even if object's parent changed from dialog to windows.

Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: Dialog controls are flickering when resized..
I prepared MDI sample based on the rc file you posted. Flickering, if any, is negligible.
1) If you find massive flickering, please post a sample rc file.
2) If you say there is flickering in 18.04 but there was no flickering with an earlier version, please indicate the version number.
I have one question. Why should we use a dialog from resource to build a mdichild window? Why can we not use the dialog itself directly? In what way a nomodal dialog different from mdichild in functionality?
1) If you find massive flickering, please post a sample rc file.
2) If you say there is flickering in 18.04 but there was no flickering with an earlier version, please indicate the version number.
I have one question. Why should we use a dialog from resource to build a mdichild window? Why can we not use the dialog itself directly? In what way a nomodal dialog different from mdichild in functionality?
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Dialog controls are flickering when resized..
nageswaragunupudi wrote:I prepared MDI sample based on the rc file you posted. Flickering, if any, is negligible.
1) If you find massive flickering, please post a sample rc file.
2) If you say there is flickering in 18.04 but there was no flickering with an earlier version, please indicate the version number.
I have one question. Why should we use a dialog from resource to build a mdichild window? Why can we not use the dialog itself directly? In what way a nomodal dialog different from mdichild in functionality?
Mr. Rao,
I managed to reduced the flickering by:
1. removing the STYLE clause in DEFINE WINDOW (with style clause, the entire objects flickers irretably

2. removing WS_EX_TRANSPARENT property in .RC (except for the GROUP Object, which has to be really transparent)
The only control objects flickering now are GROUP and SysDateTimePick32



As for your question #2, I have been experiencing the flickering ever since when now I realized removing the STYLE clause did it.
And for your last question, it is easier for me to define it in Resource as Dialog then re-assign the object's parent to Child window.. User can open multiple window and just cascade or tile whatever suits their style in data encoding/analysis.. or maybe it just me.

Maybe there is a way not to flicker the Group


Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: Dialog controls are flickering when resized..
I did not find any flickering with Groupbox. The only issue I found was that the transparency does not work correctly on gradient and image brushes, when resized.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Dialog controls are flickering when resized..
nageswaragunupudi wrote:I did not find any flickering with Groupbox. The only issue I found was that the transparency does not work correctly on gradient and image brushes, when resized.
I got this with GroupBox .. at least the SAYs and GETs are not affected.

If you noticed, the xBrowse inside the FoldereX also flickers..

Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15