我想将文字输入到状态栏,但不知怎么做?相关的问题:
1、定义状态栏的大小 2、将状态栏的文字删除
新手上路,请多指教!
谢谢!!!
解决方案 »
- 做模拟登录,求教一个字符串拼接问题。
- 求救,我现在知道如何选中麦克风录音,不知道怎么选中Stereo Mix(混音)或Mono Mix(单声道)录音,哪位看一下我的程序指导一下啊
- 怎杨把数字转换成字符串
- 我怎么样才能让别人的机器运行我的程序
- 问题是,Norton AntiVirus 发现病毒后,不停的警告,我想屏蔽警告,
- 一个奇怪的问题
- 如何结束已经出让控制权的循环?
- 怎样删除已经注册的控件
- 做报表快把我累死了!谁知道类似excel的电子表格是怎莫做的,我想做一个自己可随意定制的电子表格(最好有源代码),先谢谢了!
- 谁能告诉我,怎样截取一张VC++启动时的那幅引导画面?
- 如何得到catch时出错的代码行数?
- 关于Runtime Error问题,急!!请教各位高高手 在线等待!
#define NUM_PANES 3
int aWidth[NUM_PANES]={x1,x2,...};
::SendMessage(hStatusBar, SB_SETPARTS, NUM_PANES, (LPARAM)aWidth);
2、::SendMessage(hStatusBar, SB_SETTEXT, iPane, (LPARAM)TEXT(""));
m_wndStatusBar.SetPaneText (index,"测试完成!");
static UINT redefine_indicators[] =
{
ID_SEPARATOR, // status line indicator
ID_INDICATOR_INFO,
ID_INDICATOR_TIME,
ID_INDICATOR_CAPS,
ID_INDICATOR_NUM,
ID_INDICATOR_SCRL,
ID_INDICATOR_TITLE,
};
if (!m_wndStatusBar.CreateEx(this) ||
!m_wndStatusBar.SetIndicators(redefine_indicators,
sizeof(redefine_indicators)/sizeof(UINT)))
{
TRACE0("Failed to create status bar\n");
return -1; // fail to create
}
m_wndStatusBar.GetStatusBarCtrl().SetMinHeight(20);
m_wndStatusBar.SetPaneText(m_wndStatusBar.CommandToIndex(ID_INDICATOR_TITLE), "管理平台");void CMainFrame::OnSize(UINT nType, int cx, int cy)
{
CMDIFrameWnd::OnSize(nType, cx, cy);
SetStatusPanel(cx);
}void CMainFrame::SetStatusPanel(int nWidth)
{
const int nParts = 7;
int widths[nParts] = {nWidth-420, nWidth-300, nWidth-180, nWidth-145, nWidth-110, nWidth-75, -1};
if (m_wndStatusBar)
{
if (nWidth < 400)
{
widths[0] = nWidth*2/5;
widths[1] = nWidth*11/20;
widths[2] = nWidth*29/40;
widths[3] = nWidth*31/40;
widths[4] = nWidth*33/40;
widths[5] = nWidth*35/40;
widths[6] = -1;
}
}
else
return;
m_wndStatusBar.GetStatusBarCtrl().SetParts(nParts, widths);
}void CMainFrame::SetStatusPanelText(UINT nIDFind, CString strText)
{
m_wndStatusBar.SetPaneText(m_wndStatusBar.CommandToIndex(nIDFind), strText);
CString strBuffer;
strBuffer = m_wndStatusBar.GetPaneText(1);
}
((CMainFrame*)m_pMainWnd)->SetStatusPanelText(ID_INDICATOR_INFO, "登录操作员【" + m_strOpCode + "】");