Print Page | Close Window

CXTListTab.SetExtendedStyle Bug

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=209
Printed Date: 22 December 2024 at 9:45pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTListTab.SetExtendedStyle Bug
Posted By: ysavourel
Subject: CXTListTab.SetExtendedStyle Bug
Date Posted: 03 November 2003 at 4:04pm

I've noticed a invalid behavior in the SetExtendedStyle method of CXTListCtrl (or more exactly of CXTListCtrlBase).

The code is currently:

AFX_INLINE void CXTListCtrlBase::SetExtendedStyle(DWORD dwExStyle) {

ASSERT(::IsWindow(m_pListCtrl->GetSafeHwnd())); m_pListCtrl->SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, GetExtendedStyle()|dwExStyle);

}

The use of GetExtendedStyle() prevent the switching on/off of a style. For example:

if ( g_nOptions & MAINOPTIONS_USEGRIDLINES )

m_List.SetExtendedStyle(m_List.GetExtendedStyle()|LVS_EX_GRI DLINES);

else

m_List.SetExtendedStyle(m_List.GetExtendedStyle()&~LVS_E X_GRIDLINES);

does not work with CXTListCtrl, while is works with CListCtrl.

Is there a reason for XT to use "GetExtendedStyle()|dwExStyle" instead of just "dwExStyle" ?

 

Thanks

-yves

 

 




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