FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Para Antonio - Como rolar header e Footer de THEADER
Posts: 344
Joined: Tue Oct 11, 2005 11:33 AM
Para Antonio - Como rolar header e Footer de THEADER
Posted: Thu Mar 23, 2006 09:36 PM
Olá Antonio,

Estou a fazer algumas mudanças na classe WBROWSE e eu gostaria de saber se você poderia me dar uma dica de como fazer o Header e Footer rolar na tela quando eu clicar no objeto SCROLL.

Eu estou usando a classe THEADER de FWH.

Desde já agradeço qualquer ajuda :-)

Obrigado,

Rossine.

Obrigado, Regards, Saludos



Rossine.



Harbour and Harbour++
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Para Antonio - Como rolar header e Footer de THEADER
Posted: Thu Mar 23, 2006 11:50 PM

Rossine,
How have create light header to wbrowse ?

Regards

Best Regards, Saludos



Falconi Silvio
Posts: 845
Joined: Sun Oct 09, 2005 05:36 PM
Para Antonio - Como rolar header e Footer de THEADER
Posted: Fri Mar 24, 2006 01:10 AM

Rossine, como hiciste para poder juntar theader y wbrowse, puedes poner el ejemplo? si modificaste la clase me la pudieras enviar?
saludos
Pako

____________________

Paco
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Para Antonio - Como rolar header e Footer de THEADER
Posted: Fri Mar 24, 2006 09:10 AM

Rossine,

Prueba a cambiar la DATA nLeft del header:

oHeader:nLeft -= ...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 344
Joined: Tue Oct 11, 2005 11:33 AM
Para Antonio - Como rolar header e Footer de THEADER
Posted: Fri Mar 24, 2006 11:05 AM

Olá Antonio,

nLeft já é igual a 0 se se eu subtrair está ficando negativo e o Header/Footer está sumindo da tela :(

Pako e Silvio, assim que eu conseguir fazer funcionar postarei aqui um exemplo ok ? :D

Antonio, alguma outra idéia ?

Obrigado,

Rossine.

Obrigado, Regards, Saludos



Rossine.



Harbour and Harbour++
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Para Antonio - Como rolar header e Footer de THEADER
Posted: Fri Mar 24, 2006 12:25 PM

Rossine,

> nLeft já é igual a 0 se se eu subtrair está ficando negativo e o Header/Footer está sumindo da tela

No entiendo lo que dices. Puedes decirlo en inglés ? O explicarlo un poco más ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 344
Joined: Tue Oct 11, 2005 11:33 AM
Para Antonio - Como rolar header e Footer de THEADER
Posted: Fri Mar 24, 2006 12:56 PM
Olá Antonio,

Excuse I am using me a translator :-)

nLeft already is like 0 itself be subtracted I is stayed negative film strip and the Header/Footer is disappearing of the screen

See this image:



Talvez isto seria a solução:

The HD_LAYOUT structure contains information used to set the size and position of a header control. 

typedef struct _HD_LAYOUT {  // hdl  
    RECT FAR*      prc;  
    WINDOWPOS FAR* pwpos; 
} HD_LAYOUT; 
 

Members

prc

Pointer to a RECT structure that contains the coordinates of a rectangle that the header control is to occupy.

pwpos

Pointer to a WINDOWPOS structure that receives information about the appropriate size and position of the header control.

 

Remarks

This structure is used with the HDM_LAYOUT message.


Se for isto a solução, como faço para inseri-lo em theaders.c ?

Gracias,

Rossine.
Obrigado, Regards, Saludos



Rossine.



Harbour and Harbour++
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Para Antonio - Como rolar header e Footer de THEADER
Posted: Sat Mar 25, 2006 07:56 AM
Rossine,

Please add this code to theaders.c:
#ifdef __HARBOUR__
   CLIPPER HEADERLAYOUT( PARAMS ) // hWnd [, aRect] --> aInfo
#else   
   CLIPPER HEADERLAYO( PARAMS ) // UT()
#endif
{
   RECT prc;
   WINDOWPOS pwpos;
   HDLAYOUT hdlayout;

   hdlayout.prc = &prc;
   hdlayout.pwpos = &pwpos;

   if( PCOUNT() > 1 )
   { 
      hdlayout.prc->left   = _parnl( 2, 1 );
      hdlayout.prc->top    = _parnl( 2, 2 );
      hdlayout.prc->right  = _parnl( 2, 3 );
      hdlayout.prc->bottom = _parnl( 2, 4 );
   }   
      	
   SendMessage( ( HWND ) _parnl( 1 ), ( LONG ) HDM_LAYOUT, 0, ( LPARAM ) &hdlayout );
   
   _reta( 7 );
   _stornl( ( LONG ) hdlayout.pwpos->hwnd, -1, 1 );
   _stornl( ( LONG ) hdlayout.pwpos->hwndInsertAfter, -1, 2 );
   _storni( hdlayout.pwpos->x, -1, 3 );
   _storni( hdlayout.pwpos->y, -1, 4 );
   _storni( hdlayout.pwpos->cx, -1, 5 ); 	   
   _storni( hdlayout.pwpos->cy, -1, 6 );
   _stornl( hdlayout.pwpos->flags, -1, 7 );
}
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Para Antonio - Como rolar header e Footer de THEADER
Posted: Sat Mar 25, 2006 07:59 AM

Rossine,

Also, this information may be usefull:
>>
If you want to use the HDM_LAYOUT message to set the initial size and position of a header window, you should set the initial visibility state of the window so that it is hidden (by specifying the HDS_HIDDEN style). Once you have created the window and used the HDM_LAYOUT message to get the size and position values, you can call the SetWindowPos function to set the new size, position, and visibility state.
>>

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 344
Joined: Tue Oct 11, 2005 11:33 AM
Para Antonio - Como rolar header e Footer de THEADER
Posted: Sat Mar 25, 2006 03:36 PM
Olá Antonio,

Funcionou 1000% :-) :-) :-) :-) :-)

Veja o que tive que fazer:

**************
function ROLAR( cLado )
**************

if cLado = "D"  && Rolar para direita
   nPos += 10
else                && SenĂŁo para a esquerda
   nPos -= 10
endif

SetWindowPos( oHeader:hWnd, 0, 40, nPos, 1000, 40, SWP_FRAMECHANGED )

return NIL


Veja:



Mil Gracias Maestro :-)

Saludos,

Rossine.
Obrigado, Regards, Saludos



Rossine.



Harbour and Harbour++
Posts: 218
Joined: Fri Oct 07, 2005 01:55 AM
Para Antonio - Como rolar header e Footer de THEADER
Posted: Sat Mar 25, 2006 04:36 PM

Hi Rossine,

Very nice.
Could you share this code for us?

Regards,

Richard

Posts: 344
Joined: Tue Oct 11, 2005 11:33 AM
Para Antonio - Como rolar header e Footer de THEADER
Posted: Sat Mar 25, 2006 04:56 PM
Olá Richard,

SET PORTUGUESE ON

Assim que eu tiver concluído as mudanças, irei compartilhar com todos os interessados ok ?  :D 

Abraços,

Rossine.



SET ENGLISH ON

Like this that I will have concluded the changes, I am going to share with everybody them interested ok?   :D 

With best regards,

Rossine.
Obrigado, Regards, Saludos



Rossine.



Harbour and Harbour++
Posts: 845
Joined: Sun Oct 09, 2005 05:36 PM
Para Antonio - Como rolar header e Footer de THEADER
Posted: Sat Mar 25, 2006 05:19 PM

Hola rossine,
Pudieras compartir la clase modificada para usarla con wbrowse y el ejemplo, creo que a muchos nos vendria de perlas... :D
por cierto, felicidades que buen trabajo...
ssalu2
pako

____________________

Paco
Posts: 344
Joined: Tue Oct 11, 2005 11:33 AM
Para Antonio - Como rolar header e Footer de THEADER
Posted: Sat Mar 25, 2006 09:11 PM
Ola Pako,

Assim que possível as modificações estiverem prontas postarei o código fonte para todos ok ?

Vejam como está ficando :-)




Abraços a todos,

Rossine.
Obrigado, Regards, Saludos



Rossine.



Harbour and Harbour++
Posts: 218
Joined: Fri Oct 07, 2005 01:55 AM
Para Antonio - Como rolar header e Footer de THEADER
Posted: Sun Mar 26, 2006 01:48 AM

Hola rossine,

Thank you so much.
Power user for us.

Regards,

Richard