Enable/disable scroll bar

Enable/disable scroll bar

Postby AntoninoP » Thu Jul 09, 2015 10:51 am

Hello,
Developing I see that the Enable/Disable method does not work for "non-true ScrollBar Controls".
I tried with:

for scrllbar.prg
Code: Select all  Expand view
  METHOD Enable() INLINE ::lActive := .t.,;
                     if( ::lIsChild, EnableScrollBar(::oWnd:hWnd,  If( ::lVertical, SB_VERT, SB_HORZ ), .T.), ;
                              ::Super:Enable() )
   METHOD Disable() INLINE ::lActive := .f.,;
                     if( ::lIsChild, EnableScrollBar(::oWnd:hWnd,  If( ::lVertical, SB_VERT, SB_HORZ ), .f.), ;
                              ::Super:Disable() )
 

for scroll.c
Code: Select all  Expand view

HB_FUNC( ENABLESCROLLBAR )
{
   EnableScrollBar( ( HWND ) hb_parnl( 1 ),
                   hb_parni( 2 ),
                   hb_parl( 3 )? ESB_ENABLE_BOTH : ESB_DISABLE_BOTH );
}

//----------------------------------------------------------------------------//
 


if needs:
Code: Select all  Expand view
#define ESB_ENABLE_BOTH     0x0000
#define ESB_DISABLE_BOTH    0x0003


the problem is that in msdn says that EnableScrollBar is for windows vista and later, it is correct?

can someone try to compile with borland 5, please?
AntoninoP
 
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy

Re: Enable/disable scroll bar

Postby Antonio Linares » Fri Jul 10, 2015 12:12 pm

Antonino,

I just compiled it with bcc 7 and Visual Studio and compiled fine
regards, saludos

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


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

Who is online

Users browsing this forum: No registered users and 7 guests