Print Page | Close Window

A problem of CXTOutBarCtrl remove

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=2630
Printed Date: 08 November 2025 at 4:02pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: A problem of CXTOutBarCtrl remove
Posted By: redduke
Subject: A problem of CXTOutBarCtrl remove
Date Posted: 25 July 2005 at 3:37am

when i remove the first folder of the CXTOutBarCtrl

it seems that others folder's index have been changed.

but i do not want them to be changed

(because i want to insert items with the indexs that i stored

in create these folders   .and  the item data is read from the network .

so i must know the folder index )

how can i make it ?

is there any handles that point to the Folder or item

just as the HTREEITEM in the tree ctrl ?

thanks




Replies:
Posted By: bevpet
Date Posted: 26 July 2005 at 3:13pm

you should never use/rely on the index value for a key value of a record from a database or such.

use the controls data storage object to store data specific values

for your control:

Call this member function to set the item data (lParam) for the specified item in the currently selected folder.

virtual void SetItemData(
    const int iIndex, 
    const DWORD dwData
);

iIndex
Index of the item to set item data for.
dwData
Item data (lParam) to set.

Call this member function to get the item data (lParam) for the specified item in the currently selected folder.

virtual DWORD GetItemData(
    const int iIndex
) const;

iIndex
Index of the item to retrieve item data for.

A DWORD value.

 

HTH

 




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