The only major difference is that A label is a TControl where as a
TCustomPanel is a TWinControl. Which means that the Handle you should have
should be the parent handle of the owner/parent of the TControl. If it ends
up on the desktop, sounds like a DC (Device context) of 0/Zero.

It think the issue might be the device context passed in the WM_PAINT
message.

Myles.


-----Original Message-----
From: Rohit Gupta [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 26 May 2004 15:47
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] Rotated Font


I have created a label class that can write its caption vertically.  
Myles, the code was derived from your work on weekly-calendar.

I find that if I base it on TCustomPanel, everything works fine.

However, I want it to descend from TCustomLabel.  Just 
sometimes, the rotated caption is written on the the desktop.  WHen 
this happens, its not written on the label.  As an example the first 
attempt goes to the desktop, the next four to the label the next to 
the desktop, the next 7 to the label and the next to the desktop.

And the ruddy thing is repeatable.  I am writing to the Canvas of the 
label.  How can it be right on one paint and wrong on another ?  
Tracing through all parameters are sensible - position, rect, handle 
etc.  And if they werent it would never write to the right place !!

Any clues anyone ?
Regards

Rohit

====================================================
==================
CFL - Computer Fanatics Ltd.  21 Barry's Point Road, AKL, New 
Zealand
PH    (649) 489-2280 
FX    (649) 489-2290
email [EMAIL PROTECTED]  or  [EMAIL PROTECTED]
====================================================
==================


_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to