PRB: Owner-Drawn ListView Control in 68K Application Crashes Macintosh (200099)
The information in this article applies to:
- Microsoft Visual C++, Macintosh Cross-Development Addon 4.0b
This article was previously published under Q200099 SYMPTOMS
When displaying an owner-drawn ListView control in report view on a 68K
Macintosh, the Macintosh system crashes displaying the following
message:
Sorry, a system error occurred.
"application name"
divide by zero
If the program is executed under the debugger, Developer Studio displays the following message:
Exception in xxx.exe: 0x00000004: Divide by Zero
CAUSE
A bug with the height initialization of the ListView item for the
control causes the internal call to ShowWindow to perform a divide-by-zero operation.
RESOLUTION
Set the height of the ListView control item to an appropriate value in
the parent window's WM_MEASUREITEM handler for the ListView control.
This can be done through the itemHeight field of the LPMEASUREITEMSTRUCT
structure pointer provided.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. REFERENCES
(c) Microsoft Corporation 1999, All Rights Reserved. Contributions by Adam Kim, Microsoft Corporation.
Modification Type: | Major | Last Reviewed: | 8/27/2002 |
---|
Keywords: | kbDSupport kbprb KB200099 |
---|
|