How can I get color on my Gadgets? I don't know , is there an option at the Visual Designer? If not, can I get an Update, and where?
Is there an other posibility ?
Thanks a lot !
Color for Gadgets ????
we can do some cosmetic things on windows and gadgets through the MS API. I prepared for you a little example but it doesn't work on gagdet at this step... If someone else can have a look at it and complete it, it would be nice :
i guess we must use gadget callbacks to do it, no ?
Code: Select all
;----------
Procedure Colorize( object.l, color.l )
If object <> #NULL
hBrush.l = CreateSolidBrush_( color )
If hBrush <> #NULL
SetClassLong_( object, #GCL_HBRBACKGROUND, hBrush )
InvalidateRect_( object, 0, #TRUE )
EndIf
EndIf
EndProcedure
Procedure ColorizeFree( object.l )
If object <> #NULL
hBrush.l = GetClassLong_( object, #GCL_HBRBACKGROUND )
If hBrush <> #NULL
DeleteObject_( hBrush )
EndIf
EndIf
EndProcedure
;----------
hWnd.l = OpenWindow(0,200,200,200,100,#PB_Window_SystemMenu,"")
If hWnd = #NULL : End : EndIf
If CreateGadgetList( hWnd ) = #NULL : End : EndIf
;----------
hGad.l = ButtonGadget( 0, 10, 10, 180, 80, "BackColor Test" )
Colorize( hWnd, RGB(200,200,100) )
Colorize( hGad, RGB(100,200,200) )
;----------
While WaitWindowEvent() <> #WM_CLOSE : Wend
;----------
ColorizeFree( hGad )
ColorizeFree( hWnd )
End
;----------
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
-
Edwin Knoppert
- Addict

- Posts: 1073
- Joined: Fri Apr 25, 2003 11:13 pm
- Location: Netherlands
- Contact:
- Andre
- PureBasic Team

- Posts: 2148
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Or take a look at the Code-Archive on www.purearea.net 
Visit the Powerbasic, IBasic or Purebasic Forum, Edwin is everywhere and offers his tools.I know of a tool which does that
Your tools might be good Edwin but, is there a need to post this regular?
If anybody is interested to test or buy your soft he/she can visit your Homepage.
I think this is a board to discuss problems and share code and not a barbershop.
Manne
-
Edwin Knoppert
- Addict

- Posts: 1073
- Joined: Fri Apr 25, 2003 11:13 pm
- Location: Netherlands
- Contact:
@ Anyone having a problem with commercial software
*steps on soapbox*
Please stop flaming people for advertising their product when their product provides a service someone *requests*!
If he were blatantly spamming the forum every day then I too would ask him to stop, but he's not doing that.
If someone were asking me for a language to develop windows apps in I would suggest PureBasic every time - and you would probably do the same. Edwin is doing nothing different. When people ask about something he has or provides he informs them - it's not random spamming.
I think it's excellent when people give away software for free but until we have a Star Trek like existence where everything is handed to us we all must make some money. Lets not give those people trying to make an honest dollar (or pound or peso or whatever) a hard time!
*steps off soapbox*
I'll apologize up front for the rant. I just dislike seeing people made to feel bad for trying to make an honest living. Commercial software is not evil!
*steps on soapbox*
Please stop flaming people for advertising their product when their product provides a service someone *requests*!
If he were blatantly spamming the forum every day then I too would ask him to stop, but he's not doing that.
If someone were asking me for a language to develop windows apps in I would suggest PureBasic every time - and you would probably do the same. Edwin is doing nothing different. When people ask about something he has or provides he informs them - it's not random spamming.
I think it's excellent when people give away software for free but until we have a Star Trek like existence where everything is handed to us we all must make some money. Lets not give those people trying to make an honest dollar (or pound or peso or whatever) a hard time!
*steps off soapbox*
I'll apologize up front for the rant. I just dislike seeing people made to feel bad for trying to make an honest living. Commercial software is not evil!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net


