BOOL CStaticLink::GetColorRGB(CString& strColorText , COLORREF& color)
{
strColorText=strColorText.Left(strColorText.GetLength()-1);
strColorText=strColorText.Right(strColorText.GetLength()-4);
CString chR= _T(“”), chG= _T(“”), chB= _T(“”);
AfxExtractSubString( chR, (LPCTSTR)strColorText, 0, ‘,’);
AfxExtractSubString( chG, (LPCTSTR)strColorText, 1, ‘,’);
AfxExtractSubString( chB, (LPCTSTR)strColorText, 2, ‘,’);
color = RGB( _ttoi(chR), _ttoi(chG), _ttoi(chB));
return TRUE;
}
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/210715.html原文链接:https://javaforall.net
