VC2010 MFC工程中 MSChart x轴刻度标注 无法输出 有关问题
VC2010 MFC工程中 MSChart x轴刻度标注 无法输出 问题
char buf[32];
srand( (unsigned)time( NULL ) );
for(int row = 1; row <= nRowCount; ++row)
{
m_Chart.SetRow(row);
sprintf(buf, "%d号 ", row);
m_Chart.SetRowLabel((LPCTSTR)buf);//_T( "a ")
...
}
我把网上的MSChart的示例程序在VC2010 MFC工程中重新了一遍,发现x轴的标注 输出的是“??????”,我觉的问题是在
m_Chart.SetRowLabel((LPCTSTR)buf)上,我把它改成m_Chart.SetRowLabel(_T( "a "))发现 x轴能输出 “a”。
大家看这个问题该怎么解决呢?
------解决方案--------------------
TCHAR buf[32];
srand( (unsigned)time( NULL ) );
for(int row = 1; row <= nRowCount; ++row)
{
m_Chart.SetRow(row);
_stprintf(buf, _T("%d号 "), row);
m_Chart.SetRowLabel((LPCTSTR)buf);//_T( "a ")
...
}
char buf[32];
srand( (unsigned)time( NULL ) );
for(int row = 1; row <= nRowCount; ++row)
{
m_Chart.SetRow(row);
sprintf(buf, "%d号 ", row);
m_Chart.SetRowLabel((LPCTSTR)buf);//_T( "a ")
...
}
我把网上的MSChart的示例程序在VC2010 MFC工程中重新了一遍,发现x轴的标注 输出的是“??????”,我觉的问题是在
m_Chart.SetRowLabel((LPCTSTR)buf)上,我把它改成m_Chart.SetRowLabel(_T( "a "))发现 x轴能输出 “a”。
大家看这个问题该怎么解决呢?
------解决方案--------------------
TCHAR buf[32];
srand( (unsigned)time( NULL ) );
for(int row = 1; row <= nRowCount; ++row)
{
m_Chart.SetRow(row);
_stprintf(buf, _T("%d号 "), row);
m_Chart.SetRowLabel((LPCTSTR)buf);//_T( "a ")
...
}