Page 1 of 1

Change style's to DATA

PostPosted: Tue Jan 13, 2009 10:50 am
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  Expand view
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)

Re: Change style's to DATA

PostPosted: Tue Jan 13, 2009 11:11 pm
by Antonio Linares
You can use:

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

Re: Change style's to DATA

PostPosted: Wed Jan 14, 2009 4:01 pm
by sambomb
Thanks Linares, I already discover how to change :D but it's difficult to understand.

Re: Change style's to DATA

PostPosted: Sat Jan 24, 2009 7:02 pm
by Antonio Linares
Windows API's rules :-)

Re: Change style's to DATA

PostPosted: Mon Jan 26, 2009 11:22 am
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...

Re: Change style's to DATA

PostPosted: Mon Jan 26, 2009 11:49 am
by Enrico Maria Giordano
On MSDN.

EMG

Re: Change style's to DATA

PostPosted: Mon Jan 26, 2009 1:37 pm
by Antonio Linares

Re: Change style's to DATA

PostPosted: Mon Jan 26, 2009 5:50 pm
by sambomb
Thanks, I will take a look :wink: