|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Alastair Watts
|
Nov 4, 2011 - 4:44 AM
|
How would I draw a line under the tabs?
|
|
Alastair Watts
|
Nov 9, 2011 - 4:12 AM
|
Almost got it ... I’m having to manually adjust the coords though, whats the correct way of doing it?
PS: What’s up with forum message cut & paste ... it never seems to work properly!
CExtTWPC < CExtTabWnd > :: OnTabWndDrawEntire(dc, rcClient);
TAB_ITEM_INFO* pTab = ItemGet(SelectionGet()); CRect rcTab = pTab->ItemRectGet(); rcTab.left += 4; rcTab.right += 3;
dc.FillSolidRect(rcClient.left, rcClient.bottom - 1, rcTab.left, rcClient.bottom - 1, RGB(240, 240, 240)); dc.FillSolidRect(rcTab.right, rcClient.bottom - 1, rcClient.right, rcClient.bottom - 1, RGB(240, 240, 240));
|
|
Alastair Watts
|
Nov 9, 2011 - 3:50 AM
|
GetRectTabNearBorderArea() returns (0, 0, 0, 0) & nothing else throughout the life of the application ... so I’m using rcClient instead. I’m currently drawing a line under all tabs, how do I get the area of the currently selected tab so that don’t draw a line under it?
|
|
Technical Support
|
Nov 8, 2011 - 7:48 AM
|
It can be empty initially or when the layout computation is delayed. You should ignore these cases.
|
|
Alastair Watts
|
Nov 8, 2011 - 2:37 AM
|
GetRectTabNearBorderArea() is returning (0, 0, 0, 0) ???
|
|
Technical Support
|
Nov 7, 2011 - 12:42 PM
|
Here is the sample code:
class CMyTabWnd : public CExtTWPC < CExtTabWnd >
{
public:
virtual void OnTabWndDrawEntire(
CDC & dc,
CRect & rcClient
)
{
CExtTWPC < CExtTabWnd > :: OnTabWndDrawEntire( dc, rcClient );
CRect rcNearBorder = GetRectTabNearBorderArea();
. . . to-do: draw your lines here
}
};
class CMyTabPageContainerWnd : public CExtTabPageContainerWnd
{
public:
virtual CExtTabWnd* OnTabWndGetTabImpl()
{
return new CMyTabWnd;
}
};
|
|