问如何布置多个dialogbar的位置,并在 view中实现隐藏和出现的切换(谢谢各位) 最好有个例子。[email protected]
解决方案 »
- 我在VC界面程序里面写一段代码,包含lib文件后,运行的出现连接错误,请问这是什么原因?
- 怎么改变控件的窗口样式?
- 怎么建立一个CDC的列表或数组?
- 百分求教,窗口最大最小化和还原过程中的标题栏问题
- CListCtrl能设置行高吗?
- 请教一个问题,急:如何把TCHAR变量转化为LPCSTR??
- 哪里有在eMbedded Visual C上实现RSA算法的库啊。
- 请教一个网络地址和端口转换的问题,小弟没分了,但很急,请个为大侠帮帮忙!!!
- MFC AppWizard(exe)与Win32 Console Application的区别?
- 为什么点击“软件”要求输入网络密码?
- 请教一个逐点显示的问题
- 线程取消问题.
void DockControlBar( CControlBar * pBar, UINT nDockBarID = 0, LPCRECT lpRect = NULL );ParameterspBarPoints to the control bar to be docked.nDockBarIDDetermines which sides of the frame window to consider for docking. It can be 0, or one or more of the following: AFX_IDW_DOCKBAR_TOP Dock to the top side of the frame window.
AFX_IDW_DOCKBAR_BOTTOM Dock to the bottom side of the frame window.
AFX_IDW_DOCKBAR_LEFT Dock to the left side of the frame window.
AFX_IDW_DOCKBAR_RIGHT Dock to the right side of the frame window.
If 0, the control bar can be docked to any side enabled for docking in the destination frame window.lpRectDetermines, in screen coordinates, where the control bar will be docked in the nonclient area of the destination frame window.
其中顺序调用CReBar类折AddBar函数可以布置Dialogbar1及Dialogbar2的位置。
利用以下的实现方式可以实现Dialogbar1的显示、隐藏的奇偶控制。(Dialogbar2处理相同)void CMainFrame::OnViewDialogbar1()
{
BOOL bVisible = ((m_wndDialogBar1.GetStyle() & WS_VISIBLE) != 0);
m_wndDialogBar1.ShowWindow(!bVisible);
RecalcLayout();
}void CMainFrame::OnUpdateViewDialogbar1(CCmdUI* pCmdUI)
{
BOOL bVisible = ((m_wndDialogBar1.GetStyle() & WS_VISIBLE) != 0);
pCmdUI->SetCheck(bVisible);
RecalcLayout();
}