Desktop Functions: Smart Device Functions:
|
Search Results for "COLORREF" in [All]Structures1: COLORREF
struct COLORREF {
public struct COLORREF
public COLORREF(System.Drawing.Color color)
public struct COLORREF {
public COLORREF(byte r, byte g, byte b) {
public COLORREF(uint value) {
Structure COLORREF Actually, there's no COLORREF structure in native Win32. It is typedef-ed to DWORD, which means that in the managed world its direct counterpart is [System.Int32] (aka int in C#). So, when faced with interop involving COLORREF'S you'd better treat them as int's. Also have in mind that the color components are stored in reverse order, i.e. the Red component is in the lowest-byte. In short, the format is 0x00BBGGRR. You can use a code similar to the following to obtain a COLORREF:
private static int MakeCOLORREF(byte r, byte g, byte b) For converting COLORREF from and to .net's Color use 'ColorTranslator.ToWin32' and 'ColorTranslator.FromWin32' methods. 2: LOGBRUSH
public UInt32 lbColor; //colorref RGB(...) gdi323: SetBkColor
ByVal ColorRef As Long) As Long 4: SetBkMode
ByVal ColorRef As Integer) As Integer hhctrl5: HtmlHelp
struct COLORREF
uint _ColorRef;
public COLORREF(Color aValue)
_ColorRef = (uint)lRGB;
public COLORREF(int lRGB)
_ColorRef = (uint)lRGB;
int r = (int)_ColorRef & 0xff;
int g = ((int)_ColorRef >> 8) & 0xff;
int b = ((int)_ColorRef >> 16) & 0xff;
public static COLORREF FromColor(System.Drawing.Color aColor)
return new COLORREF(aColor);
public static System.Drawing.Color ToColor(COLORREF aColorRef)
return aColorRef.ToColor();
internal COLORREF clrForeground = new COLORREF(-1);
internal COLORREF clrBackground = new COLORREF(-1);
param.clrBackground = COLORREF.FromColor(back_сolor_for_popup_window); uxtheme
public extern static Int32 GetThemeColor(IntPtr hTheme, int iPartId, int iStateId, int iPropId, out COLORREF pColor);
ByRef pColor As COLORREF) As Integer kernel32
public COLORREF ColorTable[];
//struct COLORREF
public struct COLORREF
public COLORREF(System.Drawing.Color color)
internal COLORREF black;
internal COLORREF darkBlue;
internal COLORREF darkGreen;
internal COLORREF darkCyan;
internal COLORREF darkRed;
internal COLORREF darkMagenta;
internal COLORREF darkYellow;
internal COLORREF gray;
internal COLORREF darkGray;
internal COLORREF blue;
internal COLORREF green;
internal COLORREF cyan;
internal COLORREF red;
internal COLORREF magenta;
internal COLORREF yellow;
internal COLORREF white;
// public COLORREF[] ColorTable;
//public COLORREF[16] ColorTable;
public COLORREF color0;
public COLORREF color1;
public COLORREF color2;
public COLORREF color3;
public COLORREF color4;
public COLORREF color5;
public COLORREF color6;
public COLORREF color7;
public COLORREF color8;
public COLORREF color9;
public COLORREF colorA;
public COLORREF colorB;
public COLORREF colorC;
public COLORREF colorD;
public COLORREF colorE;
public COLORREF colorF;
// public COLORREF[] ColorTable;
internal COLORREF black;
internal COLORREF darkBlue;
internal COLORREF darkGreen;
internal COLORREF darkCyan;
internal COLORREF darkRed;
internal COLORREF darkMagenta;
internal COLORREF darkYellow;
internal COLORREF gray;
internal COLORREF darkGray;
internal COLORREF blue;
internal COLORREF green;
internal COLORREF cyan;
internal COLORREF red;
internal COLORREF magenta;
internal COLORREF yellow;
internal COLORREF white;
internal struct COLORREF
internal COLORREF(Color color)
internal COLORREF(uint r, uint g, uint b)
internal COLORREF black;
internal COLORREF darkBlue;
internal COLORREF darkGreen;
internal COLORREF darkCyan;
internal COLORREF darkRed;
internal COLORREF darkMagenta;
internal COLORREF darkYellow;
internal COLORREF gray;
internal COLORREF darkGray;
internal COLORREF blue;
internal COLORREF green;
internal COLORREF cyan;
internal COLORREF red;
internal COLORREF magenta;
internal COLORREF yellow;
internal COLORREF white;
csbe.black = new COLORREF(r, g, b);
csbe.darkBlue = new COLORREF(r, g, b);
csbe.darkGreen = new COLORREF(r, g, b);
csbe.darkCyan = new COLORREF(r, g, b);
csbe.darkRed = new COLORREF(r, g, b);
csbe.darkMagenta = new COLORREF(r, g, b);
csbe.darkYellow = new COLORREF(r, g, b);
csbe.gray = new COLORREF(r, g, b);
csbe.darkGray = new COLORREF(r, g, b);
csbe.blue = new COLORREF(r, g, b);
csbe.green = new COLORREF(r, g, b);
csbe.cyan = new COLORREF(r, g, b);
csbe.red = new COLORREF(r, g, b);
csbe.magenta = new COLORREF(r, g, b);
csbe.yellow = new COLORREF(r, g, b);
csbe.white = new COLORREF(r, g, b); Enums
public static PropertyKey UI_PKEY_FontProperties_ForegroundColor = new PropertyKey(new Guid(Convert.ToString(308, 16).PadLeft(8, '0') + UI_PropertyKey), (int)VarEnum.VT_UI4); // COLORREF
public static PropertyKey UI_PKEY_FontProperties_BackgroundColor = new PropertyKey(new Guid(Convert.ToString(309, 16).PadLeft(8, '0') + UI_PropertyKey), (int)VarEnum.VT_UI4); // COLORREF
public static PropertyKey UI_PKEY_Color = new PropertyKey(new Guid(Convert.ToString(400, 16).PadLeft(8, '0') + UI_PropertyKey), (int)VarEnum.VT_UI4); // COLORREF |