nbsp; rgb(0, 0, 0), // black
rgb(255, 255, 255), // white
rgb(128, 0, 0), // dark red
rgb(0, 128, 0), // dark green
rgb(128, 128, 0), // dark yellow
rgb(0, 0, 128), // dark blue
rgb(128, 0, 128), // dark magenta
rgb(0, 128, 128), // dark cyan
rgb(192, 192, 192), // light grey
rgb(128, 128, 128), // dark grey
rgb(255, 0, 0), // red
rgb(0, 255, 0), // green
rgb(255, 255, 0), // yellow
rgb(0, 0, 255), // blue
rgb(255, 0, 255), // magenta
rgb(0, 255, 255), // cyan
};
ccombocolorpicker::ccombocolorpicker()
{
m_binitialized = false;
}
ccombocolorpicker::~ccombocolorpicker()
{
}
begin_message_map(ccombocolorpicker, ccombobox)
//{{afx_msg_map(ccombocolorpicker)
on_wm_create()
//}}afx_msg_map
end_message_map()
/////////////////////////////////////////////////////////////////////////////
// ccombocolorpicker message handlers
int ccombocolorpicker::oncreate(lpcreatestruct lpcreatestruct)
{
if (ccombobox::oncreate(lpcreatestruct) == -1)
return -1;
initializedata();
return 0;
}
void ccombocolorpicker::presubclasswindow()
{
initializedata();
ccombobox::presubclasswindow();
}
void ccombocolorpicker::initializedata()
{
int nitem;
if (m_binitialized)
return;
for (int ncolor = 0; ncolor hdc))
return;
colorref rgbtextcolor