Board index » cppbuilder » creating Canvas
luca casotti
CBuilder Developer |
luca casotti
CBuilder Developer |
creating Canvas2005-05-14 04:51:08 PM cppbuilder68 I want create a Canvas in a TFrame object. in the TFrame constructor I put these lines: canv = new TCanvas(); canv->Handle = this->WindowHandle; canv->FrameRect(this->ClientRect); but here the ClipRect property of canv is (0,0,0,0) and I can't draw anything. ther's something else to do? luca |
Remy Lebeau (TeamB)
CBuilder Developer |
2005-05-15 03:47:13 AM
Re:creating Canvas
"luca casotti" < XXXX@XXXXX.COM >wrote in message
QuoteI want create a Canvas in a TFrame object. Quotecanv->Handle = this->WindowHandle; Gambit |
Fishface
CBuilder Developer |
2005-05-15 09:46:51 PM
Re:creating Canvas
Remy wrote:
QuoteLook at TControlCanvas. Canvas property, you will see that it declares a private variable to hold the TControlCanvas (pointer), a public read-only Canvas property, and a getter function to return the TControlCanvas (pointer). In the constructor, the TControlCanvas is created, and the TCustomForm (pointer) is assigned to the TControlCanvas' Control property. The TControlCanvas is deleted in the destructor of the TCustomForm. You might do the same with your TFrame descendent... {smallsort} |