FIX: Resource Editor Cannot Set LVS_OWNERDRAWFIXED Style

Last reviewed: September 18, 1997
Article ID: Q133715
2.10 WINDOWS NT kbother kbbuglist kbfixlist

The information in this article applies to:

  • The Resource Editor included with: Microsoft Visual C++, 32-bit Edition, version 2.1

SYMPTOMS

In the Resource Editor, you can specify styles for a list view control (CListCtrl) in a dialog template. Therefore, you should be able to set the owner draw fixed (LVS_OWNERDRAWFIXED) style by selecting the corresponding check box. However, the LVS_OWNERDRAWFIXED style is not saved in the resource file.

CAUSE

The problem is caused by the fact that the LVS_OWNERDRAWFIXED and LVS_ALIGNBOTTOM styles have the same value, 0x0400. Similar problems may occur if you use LVS_ALIGNMASK. Note that LVS_ALIGNBOTTOM is not used or defined in later versions of the common control header files.

RESOLUTION

Add the style manually in the resource file by opening it as a text file and adding the hexadecimal value 0x400 (a constant for LVS_OWNERDRAWFIXED as defined in the commctrl.h file) to the styles already present. Note that once you add the style, it is shown correctly as checked in the Resource Editor, but you are not able to remove it by clearing the check box. If you need to remove it, you must remove it manually.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ 4.0 and 4.1.


Additional reference words: 2.10 3.10 4.00 4.10
KBCategory: kbother kbbuglist kbfixlist
KBSubcategory: AppStudioIss
Keywords : AppStudioIss kbbuglist kbfixlist kbother
Technology : kbMfc
Version : 2.10
Platform : NT WINDOWS
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 18, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.