Print Page | Close Window

Typo in samples with ODA_SELECT

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=2306
Printed Date: 22 June 2024 at 11:05pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Typo in samples with ODA_SELECT
Posted By: CGrant
Subject: Typo in samples with ODA_SELECT
Date Posted: 01 June 2005 at 7:18pm

The Property grid samples DelphiGridPage.cpp and SimpleGridPage.cpp have a mistake in their owner draw code; where the test should be seeing if the ODA_SELECT bit is set, it sets it instead.

BOOL bSelected = ((lpDrawItemStruct->itemAction | ODA_SELECT) && (lpDrawItemStruct->itemState & ODS_SELECTED));

I suggest either replacing the '|' with '&', or remove that part of the condition.

The same code is in all the ODA_SELECTED examples.

Colin




Replies:
Posted By: Oleg
Date Posted: 03 June 2005 at 1:55am

You right!

Never trust MSDN :) this code was copied from CListBox::DrawItem member sample. :) 

we will remove this condition part.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net