ColorTheme.h文件参考

#include <Windows.h>
#include "MzfcDll.h"

宏定义

#define MZ_APP_COLOR_REG_PATH   TEXT("SOFTWARE\\Meizu\\Theme\\Colors\\App")
 registry path that saves application define colors
#define MZ_THEME_COLOR_REG_PATH   TEXT("SOFTWARE\\Meizu\\Theme\\Colors")

枚举

enum  ThemeColorIndex {
  TCI_FIRST = -1, TCI_WINDOW_BG, TCI_WINDOW_TEXT, TCI_BUTTON_TEXT,
  TCI_BUTTONEX_TEXT, TCI_BUTTONEX_TEXT2, TCI_CAPTION_TEXT, TCI_EDIT_TEXT,
  TCI_LIST_TEXT, TCI_LIST_TEXT2, TCI_LIST_TEXT3, TCI_STATIC_TEXT,
  TCI_TOOLBAR_TEXT, TCI_TOOLBAR_TEXT_DISABLED, TCI_CAPTION_BG1, TCI_CAPTION_BG2,
  TCI_LIST_GRIDLINE1_COLOR1, TCI_LIST_GRIDLINE1_COLOR2, TCI_LIST_GRIDLINE2_COLOR1, TCI_LIST_GRIDLINE2_COLOR2,
  TCI_LIST_TEXT_HIGHLIGHT, TCI_BUTTON_TEXT_NEGATIVE, TCI_LAST
}
 Theme color indexes 更多...

函数

MZFC_API COLORREF GetMzAppColor (LPCWSTR lpClrValueName, COLORREF clrDefault)
 get application define color
  • get in the registry MZ_APP_COLOR_REG_PATH the color value named lpClrValueName.
  • If the value in registry doesn't exist, it will be create and return clrDefault.
  • Notice: lpClrValueName the name of the color should be unique named. Mostly begin with your application's name. for example, the music item's high-light color can be named: "MZMUSIC_ITEM_HIGHLIGHT_COLOR",

MZFC_API COLORREF MzGetThemeColor (int nThemeColorIndex)
 Get the theme color
MZFC_API void MzResetThemeColors ()
MZFC_API BOOL SetMzAppColor (LPCWSTR lpClrValueName, COLORREF clr)
 save application define color

宏定义文档

#define MZ_APP_COLOR_REG_PATH   TEXT("SOFTWARE\\Meizu\\Theme\\Colors\\App")

registry path that saves application define colors

#define MZ_THEME_COLOR_REG_PATH   TEXT("SOFTWARE\\Meizu\\Theme\\Colors")


枚举类型文档

Theme color indexes

枚举值:
TCI_FIRST 
TCI_WINDOW_BG  Window BG color
TCI_WINDOW_TEXT  Window Font color
TCI_BUTTON_TEXT  Button text color
TCI_BUTTONEX_TEXT  UiButtonEx left text color
TCI_BUTTONEX_TEXT2  UiButtonEx right text color
TCI_CAPTION_TEXT  UiCaption text color
TCI_EDIT_TEXT  edit control text color
TCI_LIST_TEXT  list control text 1 color, main text, default is black
TCI_LIST_TEXT2  list control text 2 color, default is gray
TCI_LIST_TEXT3  list control text 2 color, default is gray
TCI_STATIC_TEXT  static control text color
TCI_TOOLBAR_TEXT  text toolbar text color
TCI_TOOLBAR_TEXT_DISABLED  text toolbar disabled text color
TCI_CAPTION_BG1  edge color
TCI_CAPTION_BG2  middle color
TCI_LIST_GRIDLINE1_COLOR1  list grid line 1's edge color
TCI_LIST_GRIDLINE1_COLOR2  list grid line 1's middle color
TCI_LIST_GRIDLINE2_COLOR1  list grid line 2's edge color
TCI_LIST_GRIDLINE2_COLOR2  list grid line 2's middle color
TCI_LIST_TEXT_HIGHLIGHT  list item's text color 1, high-light color
TCI_BUTTON_TEXT_NEGATIVE  button's text negative color. negative with TCI_BUTTON_TEXT
TCI_LAST 


函数文档

MZFC_API COLORREF GetMzAppColor ( LPCWSTR  lpClrValueName,
COLORREF  clrDefault 
)

get application define color

  • get in the registry MZ_APP_COLOR_REG_PATH the color value named lpClrValueName.
  • If the value in registry doesn't exist, it will be create and return clrDefault.
  • Notice: lpClrValueName the name of the color should be unique named. Mostly begin with your application's name. for example, the music item's high-light color can be named: "MZMUSIC_ITEM_HIGHLIGHT_COLOR",

MZFC_API COLORREF MzGetThemeColor ( int  nThemeColorIndex  ) 

Get the theme color

参数:
nThemeColorIndex index of the theme color
参见:
ThemeColorIndex, with TCI_XXXX_XXXX prefix.

MZFC_API void MzResetThemeColors (  ) 

MZFC_API BOOL SetMzAppColor ( LPCWSTR  lpClrValueName,
COLORREF  clr 
)

save application define color


Generated at Fri Feb 20 15:17:30 2009 for Meizu M8 MZFC Documentation by 魅族手机