> On 17.12.2015, at 15:49, Christian Schmitz <[email protected]> 
> wrote:
> 
> 
>> Am 17.12.2015 um 11:29 schrieb Massimo Valle <[email protected]>:
>> 
>> Windows.
>> Is there a way to determine the current theme colors used for the various 
>> elements?
>> I need to draw the disabled color in a listbox (plus custom things), but for 
>> this need to know the right color.
> 
> maybe read here?
> 
> https://msdn.microsoft.com/en-us/library/windows/desktop/ms724371(v=vs.85).aspx
> 

Right:

Function GetWinSysColor(colNo as integer) As Color
  
  // Description for color constants and API at
  // 
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724371(v=vs.85).aspx
  
  const COLOR_3DDKSHADOW = 21
  const COLOR_3DFACE = 15
  const COLOR_3DHIGHLIGHT = 20
  const COLOR_3DHILIGHT = 20
  const COLOR_3DLIGHT = 22
  const COLOR_3DSHADOW = 16
  const COLOR_ACTIVEBORDER = 10
  const COLOR_ACTIVECAPTION = 2
  const COLOR_APPWORKSPACE = 12
  const COLOR_BACKGROUND = 1
  const COLOR_BTNFACE = 15
  const COLOR_BTNHIGHLIGHT = 20
  const COLOR_BTNHILIGHT = 20
  const COLOR_BTNSHADOW = 16
  const COLOR_BTNTEXT = 18
  const COLOR_CAPTIONTEXT = 9
  const COLOR_DESKTOP = 1
  const COLOR_GRADIENTACTIVECAPTION = 27
  const COLOR_GRADIENTINACTIVECAPTION = 28
  const COLOR_GRAYTEXT = 17
  const COLOR_HIGHLIGHT = 13
  const COLOR_HIGHLIGHTTEXT = 14
  const COLOR_HOTLIGHT = 26
  const COLOR_INACTIVEBORDER = 11
  const COLOR_INACTIVECAPTION = 3
  const COLOR_INACTIVECAPTIONTEXT = 19
  const COLOR_INFOBK = 24
  const COLOR_INFOTEXT = 23
  const COLOR_MENU = 4
  const COLOR_MENUHILIGHT = 29
  const COLOR_MENUBAR = 30
  const COLOR_MENUTEXT = 7
  const COLOR_SCROLLBAR = 0
  const COLOR_WINDOW = 5
  const COLOR_WINDOWFRAME = 6
  const COLOR_WINDOWTEXT = 8
  
  #if targetWin32
    
    declare function GetSysColor lib "User32.dll" (nIndex as integer) as UInt32
    
    dim cc as Color = Integer2ColorMBS( GetSysColor(colNo) )
    
    return cc
    
  #endif
End Function

Massimo Valle



SACO Software and Consulting GmbH, Mühlgasse 5, D-97840 Hafenlohr
Tel.: ++49 9391 90890-0, Fax: ++49 9391 90890-99, E-Mail: [email protected]
Amtsgericht Würzburg HRB 5410, Geschäftsführer: Peter Schubert, 
Dipl.-Wirt.ing.(FH) Thorsten Beck

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to