I've just uploaded to http://pureproject.reelmedia.org/ a new library for Purebasic that easly let's you 'Flat' gadgets.
It will be made available soon, so keep a look for it!
Here's a direct link before it's made available there:
http://pureproject.reelmedia.org/users/ ... Gadget.zip
FlatGadget Lib for PB Windows
Nice work Num3! 

www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
-
- PureBasic Expert
- Posts: 2812
- Joined: Fri Apr 25, 2003 4:51 pm
- Location: Portugal, Lisbon
- Contact:
Here's an update using PB4 code!
Code: Select all
Procedure FlatGadget(First.l,Last.l=-1)
If Last=-1
Last=First
EndIf
For a=First To Last
If IsGadget(a)
type.l=GadgetType(a)
Select type
; enable and disable gadget's here ;)
Case #PB_GadgetType_String,#PB_GadgetType_ListIcon ,#PB_GadgetType_ListView, #PB_GadgetType_Editor, #PB_GadgetType_Tree
style.l=GetWindowLong_(GadgetID(a),#GWL_STYLE)
SetWindowLong_(GadgetID(a),#GWL_STYLE,style|#WS_GROUP|#WS_BORDER)
Case #PB_GadgetType_Panel
SetWindowLong_(GadgetID(a),#GWL_STYLE,GetWindowLong_(GadgetID(a),#GWL_STYLE)|$148)
SendMessage_(GadgetID(a),$1334,1,1)
Case #PB_GadgetType_Button, #PB_GadgetType_ButtonImage
style.l=GetWindowLong_(GadgetID(a),#GWL_STYLE)
SetWindowLong_(GadgetID(a),#GWL_STYLE,style|#BS_FLAT)
EndSelect
EndIf
Next
EndProcedure