VC++中关于状态栏的小问题?? 新建一个基于对话框的工程,并连接上一个自己编写的菜单,现在怎么样才能像基于文档的状态栏一样显示菜单项中的提示语和大写,滚动,数字键?请高手赐教。。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Using an array idices to maintain a status-bar, Details see MSDN's sample using the keyword - CStatusBar 请在CxxDlg.OnSize 事件中写入下面的语句CRect rectMain; CPaintDC dc(this); GetClientRect(rectMain); CRect rectBar ; //工具栏 CToolBar* m_pwndToolBar = (CToolBar*)AfxGetApp()->m_pMainWnd->GetDescendantWindow(AFX_IDW_TOOLBAR); m_pwndToolBar->GetClientRect(&rectBar); m_pwndToolBar->MoveWindow(0,0,rectMain.Width(),rectBar.Height()+4); //如果不加4,经过若干次最窗口改变大小,则工具栏被完全覆盖 //状态栏 CStatusBar* m_pwndStatusBar = (CStatusBar*) AfxGetApp()->m_pMainWnd->GetDescendantWindow(AFX_IDW_STATUS_BAR); m_pwndStatusBar->GetClientRect(&rectBar); m_pwndStatusBar->MoveWindow(0,cy-rectBar.Height(),rectMain.Width(),rectBar.Height()); //绘制背景色 dc.FillSolidRect(rectMain,RGB(255,255,255)); //设置为白色 简单问题,请问PCHAR 怎么转换为 CString 类型? 如何在static控件上画图?? 图形图像该怎么学习? 控件用到IE里,当IE关闭时,资源释放问题 请问在那里可以买到或者下载到《ANSI C++ 标准》 为什么我用activeX控件编写的MFC程序在有些机器上运行不了? 关于两个不同list控件数据的拖拽操作,怎么做? ------需要得到硬盘物理序列号得请看这里------ 用C或C++写驱动怎么写啊?要那些知识呢???? 寻找,查看DLL内部函数的工具 鼠标移动到realplayer视频窗口内,会出现一个带有按钮的矩形框。这种效果如何实现 VC++中关于状态栏的问题??
Details see MSDN's sample using the keyword - CStatusBar
CRect rectMain;
CPaintDC dc(this);
GetClientRect(rectMain); CRect rectBar ; //工具栏
CToolBar* m_pwndToolBar = (CToolBar*)AfxGetApp()->m_pMainWnd->GetDescendantWindow(AFX_IDW_TOOLBAR);
m_pwndToolBar->GetClientRect(&rectBar);
m_pwndToolBar->MoveWindow(0,0,rectMain.Width(),rectBar.Height()+4); //如果不加4,经过若干次最窗口改变大小,则工具栏被完全覆盖
//状态栏
CStatusBar* m_pwndStatusBar = (CStatusBar*) AfxGetApp()->m_pMainWnd->GetDescendantWindow(AFX_IDW_STATUS_BAR);
m_pwndStatusBar->GetClientRect(&rectBar);
m_pwndStatusBar->MoveWindow(0,cy-rectBar.Height(),rectMain.Width(),rectBar.Height()); //绘制背景色
dc.FillSolidRect(rectMain,RGB(255,255,255)); //设置为白色