Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - A problem of CXTOutBarCtrl remove
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

A problem of CXTOutBarCtrl remove

 Post Reply Post Reply
Author
Message
redduke View Drop Down
Newbie
Newbie


Joined: 24 July 2005
Location: China
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote redduke Quote  Post ReplyReply Direct Link To This Post Topic: A problem of CXTOutBarCtrl remove
    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

Back to Top
bevpet View Drop Down
Newbie
Newbie
Avatar

Joined: 01 April 2005
Location: Canada
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote bevpet Quote  Post ReplyReply Direct Link To This Post 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

 

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.031 seconds.