Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Display::PaintBackground not called
Display::PaintBackground not called [message #26223] Thu, 15 April 2010 08:09 Go to next message
hojtsy is currently offline  hojtsy
Messages: 241
Registered: January 2006
Location: Budapest, Hungary
Experienced Member
Some years ago I have put together the CodeMetric example. I have noticed that it no longer compiles due to library changes. I am trying to resurrect the code, and noticed that the background of ArrayCtrl cells no loger gets recolored even though I call SetDisplay with a Display subclass which overrides PaintBackground.
Only the cell's margin is painted with my PaintBackground.

void Display::Paint(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword style) const
{
    StdDisplay().Paint(w, r, q, ink, paper, style);
}


Can this be modified so that the PaintBackground of the subclass is called? Something like this (does not compile).

void Display::Paint(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword style) const
{    
    PaintBackground(w, r, q, ink, paper, style);
    StdDisplay().Paint0(w, r, q, ink, paper, style);
}


Thanks,
Sandor
Re: Display::PaintBackground not called [message #26244 is a reply to message #26223] Fri, 16 April 2010 20:15 Go to previous message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
hojtsy wrote on Thu, 15 April 2010 02:09

Some years ago



Hi, welcome back! Smile

Quote:


I have noticed that it no longer compiles due to library changes.



Well, sorry about that, CodeBase was originally meant to be used in theide only...

Quote:


I am trying to resurrect the code, and noticed that the background of ArrayCtrl cells no loger gets recolored even though I call SetDisplay with a Display subclass which overrides PaintBackground.
Only the cell's margin is painted with my PaintBackground.

void Display::Paint(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword style) const
{
    StdDisplay().Paint(w, r, q, ink, paper, style);
}


Can this be modified so that the PaintBackground of the subclass is called? Something like this (does not compile).

void Display::Paint(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword style) const
{    
    PaintBackground(w, r, q, ink, paper, style);
    StdDisplay().Paint0(w, r, q, ink, paper, style);
}


Thanks,
Sandor


OK, you are right, this makes sense. (But I am out, will sync svn at sunday evening).

Mirek


Previous Topic: Toolbar images vanishing [SOLVED]
Next Topic: Access Animated GIF ??
Goto Forum:
  


Current Time: Wed Nov 20 12:54:52 CET 2019

Total time taken to generate the page: 0.00909 seconds