On Nov 22, 2006, at 7:06 PM, Karen wrote:
RB does not expose many of the system colors (colors used for
various UI elements and actions)
With Aaron's help I think I can get them all correctly on Windows
(even if I'm not exactly sure how they are all used).
Can anybody tell me how to do it in on a Mac?
I am terrible with declares so I need a lot of detail...
Here is some old code. You can find the theme brush constants in the
MacOS Appearance Manager docs -- I think.
Charles Yeomans
Function ThemeColor(brush as Integer) As Color
dim colorPtr as MemoryBlock
dim OSErr as Integer
Const depth = 32
#if TargetCarbon
Declare Function GetThemeBrushAsColor Lib "CarbonLib" (inColor
as Integer, inDepth as Short, inColorDev as Boolean, outColor as Ptr)
as Integer
#endif
#if TargetPPC
Declare Function GetThemeBrushAsColor Lib
"AppearanceLib" (inColor as Integer, inDepth as Short, inColorDev as
Boolean, outColor as Ptr) as Integer
#endif
colorPtr = NewMemoryBlock(6)
OSErr = GetThemeBrushAsColor(brush, depth, true, colorPtr)
If OSErr <> 0 then
End if
Return RGB(colorPtr.UShort(0)\257, colorPtr.UShort(2)\257,
colorPtr.UShort(4)\257)
End Function
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>