我创建了一个控件
void CMaqEditView::OnInitialUpdate()
{
CView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
CRect rect;
GetClientRect(&rect);
rect.right=300;
if(! m_wndTab.Create(TCS_TABS| WS_CHILD | WS_VISIBLE|WS_TABSTOP ,
rect, this ,IDC_TAB))
{
TRACE0("Failed to create m_pTabCtrl bar\n");
// fail to create
}
DWORD dwExStyle= m_wndTab.GetExtendedStyle();
m_wndTab.SetExtendedStyle(dwExStyle | TCS_EX_FLATSEPARATORS); // m_wndTab.BringWindowToTop();}然后想让这个控件随着窗口的拖动改变大小
void CMaqEditView::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
CRect rect;
GetClientRect(&rect);
rect.right=300;
m_wndTab.MoveWindow(0,0,rect.right,rect.bottom);}
///////////
不知道为什么编译不过去
提示:
winocc.cpp
802 行错误
void CMaqEditView::OnInitialUpdate()
{
CView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
CRect rect;
GetClientRect(&rect);
rect.right=300;
if(! m_wndTab.Create(TCS_TABS| WS_CHILD | WS_VISIBLE|WS_TABSTOP ,
rect, this ,IDC_TAB))
{
TRACE0("Failed to create m_pTabCtrl bar\n");
// fail to create
}
DWORD dwExStyle= m_wndTab.GetExtendedStyle();
m_wndTab.SetExtendedStyle(dwExStyle | TCS_EX_FLATSEPARATORS); // m_wndTab.BringWindowToTop();}然后想让这个控件随着窗口的拖动改变大小
void CMaqEditView::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
CRect rect;
GetClientRect(&rect);
rect.right=300;
m_wndTab.MoveWindow(0,0,rect.right,rect.bottom);}
///////////
不知道为什么编译不过去
提示:
winocc.cpp
802 行错误
提示:
winocc.cpp
802 行错误具体错误??
如果我想在MainFrame 中建立一个CTabCtrl 的控件.不知道为什么不能显示出来.即使我用了BringToTop 也没有用