Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Typo in samples with ODA_SELECT
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Typo in samples with ODA_SELECT

 Post Reply Post Reply
Author
Message
CGrant View Drop Down
Newbie
Newbie
Avatar

Joined: 30 May 2005
Location: United Kingdom
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote CGrant Quote  Post ReplyReply Direct Link To This Post Topic: Typo in samples with ODA_SELECT
    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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.171 seconds.