Change style's to DATA

Post Reply
User avatar
sambomb
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil
Contact:

Change style's to DATA

Post by sambomb »

I'm with a trouble to change a Buttombmp style(especificaly WS_TABSTOP) and a LOT of good programmers don't know how to change the style in execution...
I think that change the nStyle for logical Data will solve all this troubles...

Code: Select all

Ex.:  Redefine ButtonBMP oBtn;
        ID         100
        Prompt "Can be focused";
        Update;
        Action CanFocus(oBtn)

Procedure CanFocus(oObj)

   oObj:[red]WS_TABSTOP[/red] := !oObj:WS_TABSTOP
   if   oObj:WS_TABSTOP
      oObj:settext( "Can't be focused" )
   else
      oObj:settext( "Can be focused" )
   end
   
   oObj:Refresh()

Return

The only trouble I see is a lot of classes to be changed (or not I don't know how it can be done)
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Change style's to DATA

Post by Antonio Linares »

You can use:

SetWindowLong( oBtn:hWnd, GWL_STYLE, nXor( GetWindowLong( oBtn:hWnd, GWL_STYLE ), WS_TABSTOP ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
sambomb
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil
Contact:

Re: Change style's to DATA

Post by sambomb »

Thanks Linares, I already discover how to change :D but it's difficult to understand.
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Change style's to DATA

Post by Antonio Linares »

Windows API's rules :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
sambomb
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil
Contact:

Re: Change style's to DATA

Post by sambomb »

Antonio Linares wrote:Windows API's rules :-)
Where I can find these rules?

PS.: If it was in portuguese is better for me...
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
sambomb
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil
Contact:

Re: Change style's to DATA

Post by sambomb »

Thanks, I will take a look :wink:
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
Post Reply