View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002059 | JEDI VCL | 00 JVCL Components | public | 2004-08-16 15:23 | 2004-08-17 13:18 |
Reporter | glchapman | Assigned To | user72 | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0002059: TJvFormAnimation deletes regions after call to SetWindowRgn | ||||
Description | The AnimateAppear and AnimateDisappear methods of TJvFormAnimation iterate through the regions in the FRegions array, calling SetWindowRgn with each of them. They then call DeleteRegions which calls DeleteObject on these regions. According to the SDK documentation, you are not supposed to delete region handles once they have been passed to SetWindowRgn. In this case, it appears to be basically harmless since once these regions have been replaced as the window rgn by a subsequent call to SetWindowRgn, GDI detects them as invalid and returns 0 from the call to DeleteObject. Anyway, you might want to rewrite the loops to be something like: for I := 0 to N do begin if SetWindowRgn(FForm.Handle, FRegions[I], True) <> 0 then FRegions[I]:= 0; FForm.Repaint; Sleep(10); end; And in DeleteRegions: for I := Low(FRegions) to High(FRegions) do if FRegions[I] <> 0 then DeleteObject(FRegions[I]); | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2004-08-16 15:23 | glchapman | New Issue | |
2004-08-17 13:18 |
|
Status | new => resolved |
2004-08-17 13:18 |
|
Resolution | open => fixed |
2004-08-17 13:18 |
|
Assigned To | => user72 |
2004-08-17 13:18 |
|
Note Added: 0005010 |