CColorDialog::GetColor

COLORREF GetColor( ) const;

Return Value

A COLORREF value that contains the RGB information for the color selected in the color dialog box.

Remarks

Call this function after calling DoModal to retrieve the information about the color the user selected.

Example

// Get the selected color from the CColorDialog.
CColorDialog dlg;
if (dlg.DoModal() == IDOK)
{
   COLORREF color = dlg.GetColor();
   TRACE("RGB value of the selected color - red = %u, 
      green = %u, blue = %u\n",
      GetRValue(color), GetGValue(color), GetBValue(color));
}

CColorDialog OverviewClass MembersHierarchy Chart

See Also   CColorDialog::SetCurrentColor