- CString GetColorString(){
- COLORREF col;
- DWORD dwColor[3];
- CString strColor;
- //Colorダイアログ
- CColorDialog cDlg(NULL,CC_FULLOPEN,NULL);
- if(cDlg.DoModal()!=IDOK){return strColor;}
- col = cDlg.GetColor();
- dwColor[0] = GetRValue(col);
- dwColor[1] = GetGValue(col);
- dwColor[2] = GetBValue(col);
- strColor.Format("#%02x%02x%02x",dwColor[0],dwColor[1],dwColor[2]);
- return strColor;
- }
|