菜鸟求教这段C++代码的意思
TRect CR;
void __fastcall TMainForm::SeriesAfterAdd(TChartSeries *Sender, int ValueIndex)
{
HRGN ClipRgn = CreateRectRgnIndirect(&CR);
SelectClipRgn(static_cast<TChart *>(Sender->ParentChart)->Canvas->ReferenceCanvas->Handle, ClipRgn);
DeleteObject(ClipRgn);
}
bool __fastcall TMainForm::SeriesBeforeAdd(TChartSeries *Sender)
{
TCanvas *cav = static_cast<TChart *>(Sender->ParentChart)->Canvas->ReferenceCanvas;
CR = cav->ClipRect;
TRect rc = static_cast<TChart *>(Sender->ParentChart)->ChartRect;
IntersectClipRect(cav->Handle,
rc.Left+1,
rc.Top+1,
rc.Right,
rc.Bottom);
return true;
}
[解决办法]
IntersectClipRect
函数功能:该函数创建了一个新的剪切区域,该区域是当前剪切区域和一个特定矩形的交集。
http://baike.baidu.com/view/1080439.htm