![]()  | 
 
Adding bitmap pane to CXTPStatusBar | 
 
    Post Reply  
   | 
  
| Author | |
   
   smitchell  
   
   Newbie  
   Joined: 09 January 2008 Status: Offline Points: 5  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Adding bitmap pane to CXTPStatusBarPosted: 09 January 2008 at 2:21am  | 
 
| 
   
    
   How do I add a bitmap to a pane in the CXTPStatusBar?
 
   
  It seems that CXTPStatusBarIconPane plays a role in this. 
Thanks for any pointers .... Stan 
    | 
 |
![]()  | 
 |
   
   smitchell  
   
   Newbie  
   Joined: 09 January 2008 Status: Offline Points: 5  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 10 January 2008 at 1:32pm | 
 
| 
   
    
   I came up with a solution for this.
 
   
  
Briefly: 
Derive a BmpWnd class from CXTPStatusBarPaneWnd. 
Call its Create() passing the m_wndStatusBar. 
Add a pane for it: wndStatusBar.AddIndicator(ID) 
Associate the window: wndStatusBar.AddControl(&m_bmpWnd,ID) 
Most of the work is done in BmpWnd::DoPaint() - BitBlts that make a selected color in the bmp transparent. 
------- 
BTW Ultimate Toolbox has SetPaneBitmap member in its COXStatusBar which makes this easy to do. I'm migrating our application to CJ so needed to implement the equivalent. SetPaneBitmap would be a welcome addition to CXTPStatusBar or CXTPStatusBarPane 
Cheers .... Stan (using XTP v11.2.2) 
    | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 11 January 2008 at 1:31am | 
 
| 
   
    
   Hi,
 
   
  Better derive from CXTPStatusBarPane and override its CXTPStatusBarPane::OnDraw 
CXTPStatusBarPaneWnd class add additional window handle to draw, and it can reason of flickers. 
 | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   smitchell  
   
   Newbie  
   Joined: 09 January 2008 Status: Offline Points: 5  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 11 January 2008 at 12:49pm | 
 
| 
   
    
   Hi Oleg,
 
   
  I tried your suggestion to move the implementation into CXTPStatusBarPane rather than using CXTPStatusBarPaneWnd. It worked as well but I had problems resolving heap corruption on application close during processing WM_NCDESTROY (using CXTPStatusBarPaneWnd, I don't see this). 
Thanks .... Stan 
    | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 12 January 2008 at 2:52am | 
 
| 
   
    
   Hi,
 
   
  don't delete pane manually. It will be deleted by CXTPStatusbar. and create it dynamically. 
    | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   smitchell  
   
   Newbie  
   Joined: 09 January 2008 Status: Offline Points: 5  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 15 January 2008 at 7:41pm | 
 
| 
   
    Thanks, Oleg That fixed the problem. Regards .... Stan  | 
 |
![]()  | 
 |
    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  |