ChooseColorDlg method
[This documentation is preliminary and is subject to change.]
Opens the system color-selection dialog box.
Syntax
HRESULT retVal = object.ChooseColorDlg(initColor, );
Standards information
There are no standards that apply here.
Parameters
- initColor [in, optional]
-
Type: VARIANT
A VARIANT that specifies the RGB value of the initial color selected in the color-selection dialog box. The value is specified as
0xrrggbbwhererris theredhex value,ggis thegreenhex value, andbbis thebluehex value. For a complete list of colors, see Color Table. - rgbColor [out, retval]
-
Type: VARIANT
A pointer to a VARIANT that specifies the decimal value of the color chosen in the color-selection dialog box. The value must be converted to its hexadecimal equivalent and is specified as0xrrggbb.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
There is no way to persist custom colors in this dialog box.
The return value of this method must be converted from decimal to hexadecimal before it can be used to change the collor of an object. The hexadecimal number must contain six digits to represent the RRGGBB schema required by the color table. For numbers with less than six numbers, concatenate zeros to the beginning of the number. For more information, see the Color Table.
IHtmlDlgSafeHelper::ChooseColorDlg was introduced in Microsoft Internet Explorer 6.
Build date: 6/12/2012