谢谢!急,状态栏问题
Tu小傑 2006-11-28 11:26:06 应本人现在还没有分,所以也无法给帮助我的人分数,
请问我在代码中自动创建了一个状态栏,在窗体中需要重新定义调用吗?谢谢!
我的代码是这样写的:
在窗体的.h定义为:CStatusBarCtrl m_wndStatusBar;
m_wndStatusBar.Create(WS_VISIBLE,CRect(0,0,0,0),this,100);
const int nParts = 4;
CRect rect;
m_wndStatusBar.GetClientRect(&rect);
int widths[nParts] = {rect.right-400,rect.right-200,rect.right-100,-1};
VERIFY(m_wndStatusBar.SetParts(nParts,widths));
在窗体中调用:
CTime time;
CString s;
time= CTime::GetCurrentTime();
s=time.Format("%H:%M:%S");
m_wndStatusBar.SetText(_T(s),0,0);
编译时提示:m_wndStatusBar没有定义