![]() |
some code not work for CHtmlView & CHtmlEditView |
Post Reply ![]() |
Author | |
jchip ![]() Newbie ![]() Joined: 02 March 2007 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 02 March 2007 at 11:52am |
void CShortcutBarView::OnDraw(CDC* pDC){ CShortcutBarDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); if (XTPPaintManager()->GetCurrentTheme() == xtpThemeOffice2003)pDC->Draw3dRect(CXTPClientRect( this), GetXtremeColor(XPCOLOR_FRAME), GetXtremeColor(XPCOLOR_FRAME)); elsepDC->Draw3dRect(CXTPClientRect( this), GetXtremeColor(COLOR_3DSHADOW), GetXtremeColor(COLOR_3DHIGHLIGHT));}
It only works with CView, but not work for CHtmlView & CHtmlEditView. Please help.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
See CHtmlView::OnPaint method and CHtmlView ::OnDraw:
void CHtmlView::OnDraw(CDC* /* pDC */)
{ // this class should never do its own drawing; // the browser control should handle everything ASSERT(FALSE);
} void CHtmlView::OnPaint() { Default(); } so OnDraw never called for such views.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
rmercer ![]() Groupie ![]() Joined: 22 February 2006 Status: Offline Points: 34 |
![]() ![]() ![]() ![]() ![]() |
If you're looking to draw a thin border around the view, why not just use CXTPOfficeBorder when you create the view?
|
|
![]() |
|
jchip ![]() Newbie ![]() Joined: 02 March 2007 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
CHtmlView::OnDraw never be invoked. Should I have to move the code in CHtmlView::OnPain()?
Some time looks not work perfectly.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |