CTabCtrl in CSplitterWindow
"jochen.stier" <jochen.stier-/[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
I having a problem with a CTabCtrl in a CSplitterWindow when I am using Common Controls 6.0.0.0. The area where the tabs are located is not being redrawn properly when I move the splitter. The tabs themselves are redrawn but not the area next to them. Here is a picture of what I mean (http://www.geist3d.com/images/wtl.jpg). The code that produces this problem seems quite simple:
class FrmTest : public CFrameWindowImpl<FrmTest>
{
public:
DECLARE_FRAME_WND_CLASS(NULL, IDR_MAINFRAME)
BEGIN_MSG_MAP(FrmTest)
MESSAGE_HANDLER(WM_CREATE, OnCreate)
CHAIN_MSG_MAP(CFrameWindowImpl<FrmTest>)
REFLECT_NOTIFICATIONS()
END_MSG_MAP()
LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
CTabCtrl mTab1;
CTabCtrl mTab2;
CSplitterWindowT<false> mHorizontalSplitter;
}
LRESULT FrmTest::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
LRESULT lRes = DefWindowProc(uMsg, wParam, lParam);
CRect lRect;
GetClientRect(&lRect);
// Splitters
m_hWndClient = mHorizontalSplitter.Create(m_hWnd, lRect, NULL, 0, WS_EX_CLIENTEDGE);
mHorizontalSplitter.SetSplitterExtendedStyle(SPLIT_BOTTOMALIGNED);
mTab1.Create (mHorizontalSplitter, rcDefault, NULL, WS_CHILD | WS_VISIBLE | TCS_BOTTOM);
mTab2.Create (mHorizontalSplitter, rcDefault, NULL, WS_CHILD | WS_VISIBLE );
TC_ITEM lTab;
lTab.mask = TCIF_TEXT;
lTab.pszText = _T("Scene");
lTab.cchTextMax = _tcslen(lTab.pszText);
mTab1.InsertItem(0,&lTab);
mTab2.InsertItem(0,&lTab);
lTab.mask = TCIF_TEXT;
lTab.pszText = _T("Petri");
lTab.cchTextMax = _tcslen(lTab.pszText);
mTab1.InsertItem(1,&lTab);
mTab2.InsertItem(0,&lTab);
mHorizontalSplitter.SetSplitterPanes(mTab1, mTab2);
UpdateLayout();
mHorizontalSplitter.SetSplitterPos(150);
mHorizontalSplitter.m_bFullDrag = false;
return 0;
}
This problem only occurs when I switch to Common Controls 6.0.0.0 in the stdafx.h. I.e. using
#pragma comment(linker, "/manifestdependency:\"type='win32'name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
Cheers
Jochen
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/wtl/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/wtl/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[email protected]
mailto:[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/