Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Shortcut Bar
  New Posts New Posts RSS Feed - some code not work for CHtmlView & CHtmlEditView
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

some code not work for CHtmlView & CHtmlEditView

 Post Reply Post Reply
Author
Message
jchip View Drop Down
Newbie
Newbie


Joined: 02 March 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote jchip Quote  Post ReplyReply Direct Link To This Post Topic: some code not work for CHtmlView & CHtmlEditView
    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));

else

pDC->Draw3dRect(CXTPClientRect(this), GetXtremeColor(COLOR_3DSHADOW), GetXtremeColor(COLOR_3DHIGHLIGHT));

}

 

It only works with CView, but not work for CHtmlView & CHtmlEditView.

Please help.

 

 

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 04 March 2007 at 4:04am
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
Back to Top
rmercer View Drop Down
Groupie
Groupie


Joined: 22 February 2006
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote rmercer Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2007 at 10:51am
Originally posted by jchip jchip wrote:

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));

else

pDC->Draw3dRect(CXTPClientRect(this), GetXtremeColor(COLOR_3DSHADOW), GetXtremeColor(COLOR_3DHIGHLIGHT));

}

 

It only works with CView, but not work for CHtmlView & CHtmlEditView.

Please help.

 

 

If you're looking to draw a thin border around the view, why not just use CXTPOfficeBorder when you create the view?
Back to Top
jchip View Drop Down
Newbie
Newbie


Joined: 02 March 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote jchip Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2007 at 12:08pm
Originally posted by oleg oleg wrote:

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.

 

 

CHtmlView::OnDraw never be invoked.

Should I have to move the code in CHtmlView::OnPain()?
Some time looks not work perfectly.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.