Hi. I'm implementing this "change color" common dialog box to change the colour of some polygons. anyway, i used:

CColorDialog cDlg;

...(initialising)...
cDlg.DoModal;

note that my dialog is created with "NULL"(no parent) as parameter to parent's handle.
everything's fine except for the dull looking "Color" caption. I tried to change it to "Set Triangle Color" using:

cDlg.SetWindowText("Set Triangle Color");

...but the program reported an "Assert error". I traced the program and apparently it seems that in the first line of CWnd::SetWindowText, which goes something like...

ASSERT(::IsWindow(m_hWnd));

my program got in trouble...

what's wrong with my code, or rather, is there another(better, of course) way to change the default caption of the color common dialog box??? Thanks!

(^_^)
Maikeru Shimu