![]()  | 
 
some code not work for CHtmlView & CHtmlEditView | 
 
    Post Reply  
   | 
  
| Author | |
   
   jchip  
   
   Newbie  
   Joined: 02 March 2007 Status: Offline Points: 3  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: some code not work for CHtmlView & CHtmlEditViewPosted: 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  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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  | 
 |
![]()  | 
 |
   
   rmercer  
   
   Groupie  
   Joined: 22 February 2006 Status: Offline Points: 34  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 05 March 2007 at 10:51am | 
 
   
   
 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  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 06 March 2007 at 12:08pm | 
 
   
   
 
 
 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  |