Dots disappear when drag and move control!

Dots disappear when drag and move control!

Postby vilian » Wed Apr 01, 2009 7:31 pm

Antonio,

In FWH92 as the control drag and move, the rectangle would display the displacement disappears !

How to fix it?

Code: Select all  Expand view  RUN

    @ 10,20 GET oGet VAR cVar PICTURE "@!" DESIGN SIZE 20,60 PIXEL OF oDlgEdit UPDATE
 
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Dots disappear when drag and move control!

Postby Antonio Linares » Fri Apr 03, 2009 9:04 am

Vilian,

This example works fine. Tested in Windows 7:
Code: Select all  Expand view  RUN

#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
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Dots disappear when drag and move control!

Postby vilian » Fri Apr 03, 2009 1:07 pm

Antonio,


Test with the example below. Move the control, you can see the problem.


Code: Select all  Expand view  RUN

#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

 
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Dots disappear when drag and move control!

Postby Antonio Linares » Sat Apr 04, 2009 8:49 am

Vilian,

It seems as the problem is that the border is being painted on the container window:

Image

We need to review CtrlDrawFocus() source code.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Dots disappear when drag and move control!

Postby Antonio Linares » Sun Apr 05, 2009 8:52 am

Vilian,

Fixed. These new lines are required in FWH\source\winapi\ctrldraw.c
Code: Select all  Expand view  RUN

   ...

   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 );
      ...
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Dots disappear when drag and move control!

Postby vilian » Mon Apr 06, 2009 8:33 pm

Antonio,

don´t work !!!

Code: Select all  Expand view  RUN

   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++;
   }
 
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Dots disappear when drag and move control!

Postby Antonio Linares » Mon Apr 06, 2009 9:29 pm

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Dots disappear when drag and move control!

Postby vilian » Mon Apr 06, 2009 11:16 pm

Antonio,

You can send me your ctrldraw.c or. Obj?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Dots disappear when drag and move control!

Postby Antonio Linares » Tue Apr 07, 2009 5:57 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Dots disappear when drag and move control!

Postby vilian » Tue Apr 07, 2009 11:45 am

Antonio,

Thanks, work´s fine.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil


Return to Bugs report & fixes / Informe de errores y arreglos

Who is online

Users browsing this forum: No registered users and 18 guests