Page 1 of 1
Dots disappear when drag and move control!
Posted: Wed Apr 01, 2009 7:31 pm
by vilian
Antonio,
In FWH92 as the control drag and move, the rectangle would display the displacement disappears !
How to fix it?
Code: Select all
@ 10,20 GET oGet VAR cVar PICTURE "@!" DESIGN SIZE 20,60 PIXEL OF oDlgEdit UPDATE
Re: Dots disappear when drag and move control!
Posted: Fri Apr 03, 2009 9:04 am
by Antonio Linares
Vilian,
This example works fine. Tested in Windows 7:
Code: Select all
#include "FiveWin.ch"
function Main()
local oDlg
DEFINE DIALOG oDlg TITLE "Test"
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT PlaceControls( oDlg )
return nil
function PlaceControls( oDlg )
local oGet, cVar := "Hello"
@ 20, 20 GET oGet VAR cVar PICTURE "@!" DESIGN SIZE 80, 25 PIXEL OF oDlg UPDATE
return nil
Re: Dots disappear when drag and move control!
Posted: Fri Apr 03, 2009 1:07 pm
by vilian
Antonio,
Test with the example below. Move the control, you can see the problem.
Code: Select all
#include "FiveWin.ch"
static oWnd
function Main()
local oDlg
DEFINE WINDOW oWnd ;
MDI ;
ACTIVATE WINDOW oWnd MAXIMIZED;
ON INIT ExibJanela()
RETURN NIL
FUNCTION EXIBJANELA()
DEFINE DIALOG oDlg TITLE "Test" OF OWND
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT (PlaceControls( oDlg ))
return nil
function PlaceControls( oDlg )
local oGet, cVar := "Hello"
@ 20, 20 GET oGet VAR cVar PICTURE "@!" DESIGN SIZE 80, 25 PIXEL OF oDlg UPDATE
return nil
Re: Dots disappear when drag and move control!
Posted: Sat Apr 04, 2009 8:49 am
by Antonio Linares
Vilian,
It seems as the problem is that the border is being painted on the container window:
We need to review CtrlDrawFocus() source code.
Re: Dots disappear when drag and move control!
Posted: Sun Apr 05, 2009 8:52 am
by Antonio Linares
Vilian,
Fixed. These new lines are required in FWH\source\winapi\ctrldraw.c
Code: Select all
...
while( GetParent( hWndParent ) )
{
char ClassName[ 100 ]; // new !
GetClassName( hWndParent, ClassName, 99 ); // new !
if( strcmp( ClassName, "#32770" ) == 0 ) // a Modal Dialog // new !
break; // new !
hWndParent = GetParent( hWndParent );
...
Re: Dots disappear when drag and move control!
Posted: Mon Apr 06, 2009 8:33 pm
by vilian
Antonio,
don´t work !!!
Code: Select all
while( GetParent( hWndParent ) )
{
char ClassName[ 100 ]; // new !
GetClassName( hWndParent, ClassName, 99 ); // new !
if( strcmp( ClassName, "#32770" ) == 0 ) // new !
break; // new !
hWndParent = GetParent( hWndParent );
if( ( GetWindowLong( hWndParent, GWL_STYLE ) & WS_CAPTION ) == WS_CAPTION )
iParentsWithCaption++;
}
Re: Dots disappear when drag and move control!
Posted: Mon Apr 06, 2009 9:29 pm
by Antonio Linares
Vilian,
You can download your fixed EXE from here and check it for yourself:
http://www.mediafire.com/?sharekey=414c ... 0a1ae8665a
It works fine on Windows 7
Re: Dots disappear when drag and move control!
Posted: Mon Apr 06, 2009 11:16 pm
by vilian
Antonio,
You can send me your ctrldraw.c or. Obj?
Re: Dots disappear when drag and move control!
Posted: Tue Apr 07, 2009 5:57 am
by Antonio Linares
Re: Dots disappear when drag and move control!
Posted: Tue Apr 07, 2009 11:45 am
by vilian
Antonio,
Thanks, work´s fine.