首页上一页 1 下一页尾页 1 条记录 1/1页
请教《MFC程序开发参考大全》第六章6.3.3例子
发表在C语言图书答疑
2010-06-25
是否精华
是
否
版块置顶:
是
否
根据例子:我复制过来代码如下
UINT array[3] ;
for(int i=0; i<3; i++)
{
array[i] = 100+i;
}
m_StatusBar.Create(this);
m_StatusBar.SetIndicators(array,sizeof(array)/sizeof(UINT));
for(int n =0; n<3; n++)
{
m_StatusBar.SetPaneInfo(n,array[n],0,130);
}
m_StatusBar.SetPaneText(0,"当前用户");
m_StatusBar.SetPaneText(1,"魏赞庆");
m_StatusBar.SetPaneText(2," 努力工作");
RepositionBars(AFX_IDW_CONTROLBAR_FIRST,AFX_IDW_CONTROLBAR_LAST,0);
SetTimer(1,300,NULL);
void CDOORCTRLDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
CString sText,sLeft,sRight;
int len ;
sText = m_StatusBar.GetPaneText(2);
len = sText.GetLength();
sRight = sText.Left(2);
sLeft = sText.Right(len - 2);
sText = sLeft + sRight ;
m_StatusBar.SetPaneText(2,sText);
CDialog::OnTimer(nIDEvent);
}
循环时会有一个乱码 请问是怎么回事 谢谢 请将结果发到upcwzq@163.com
UINT array[3] ;
for(int i=0; i<3; i++)
{
array[i] = 100+i;
}
m_StatusBar.Create(this);
m_StatusBar.SetIndicators(array,sizeof(array)/sizeof(UINT));
for(int n =0; n<3; n++)
{
m_StatusBar.SetPaneInfo(n,array[n],0,130);
}
m_StatusBar.SetPaneText(0,"当前用户");
m_StatusBar.SetPaneText(1,"魏赞庆");
m_StatusBar.SetPaneText(2," 努力工作");
RepositionBars(AFX_IDW_CONTROLBAR_FIRST,AFX_IDW_CONTROLBAR_LAST,0);
SetTimer(1,300,NULL);
void CDOORCTRLDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
CString sText,sLeft,sRight;
int len ;
sText = m_StatusBar.GetPaneText(2);
len = sText.GetLength();
sRight = sText.Left(2);
sLeft = sText.Right(len - 2);
sText = sLeft + sRight ;
m_StatusBar.SetPaneText(2,sText);
CDialog::OnTimer(nIDEvent);
}
循环时会有一个乱码 请问是怎么回事 谢谢 请将结果发到upcwzq@163.com