Click here to Skip to main content
15,915,324 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Serial Comms Pin
Joaquín M López Muñoz13-Jun-02 7:05
Joaquín M López Muñoz13-Jun-02 7:05 
GeneralRe: Serial Comms Pin
Derek Lakin13-Jun-02 7:55
Derek Lakin13-Jun-02 7:55 
GeneralRe: Serial Comms Pin
Joaquín M López Muñoz13-Jun-02 12:14
Joaquín M López Muñoz13-Jun-02 12:14 
GeneralRe: Serial Comms Pin
JohnnyG13-Jun-02 9:09
JohnnyG13-Jun-02 9:09 
GeneralRe: Serial Comms Pin
Derek Lakin13-Jun-02 9:21
Derek Lakin13-Jun-02 9:21 
GeneralRe: Serial Comms Pin
Ravi Sudhakar13-Jun-02 22:54
Ravi Sudhakar13-Jun-02 22:54 
Generalassociate data with tree item's Pin
Steve L.13-Jun-02 4:22
Steve L.13-Jun-02 4:22 
GeneralRe: associate data with tree item's Pin
Chris Losinger13-Jun-02 4:26
professionalChris Losinger13-Jun-02 4:26 
the typical way of doing this is to put a pointer to a data structure in the item data value for each tree item. this "data structure" can be anything you want: a class, an array, a list, a vector, a simple structure, etc.. the trick is to make sure the things you are pointing to remain active as long as the tree is alive, because don't want pointers on the tree pointing at objects that aren't alive any more!.

so, in pseudo-code:

pObject = new SomeObject;
tree.SetItemData(treeItem, (DWORD)pObject);
...
...
...
then, when you have to use the tree's data:
DWORD dwData = tree.GetItemData(treeItem);
SomeObject *pObject = (SomeObject *)dwData;
pObject->DoSomething();


-c


Cheap Oil. It's worth it!
GeneralRe: associate data with tree item's Pin
Steve L.13-Jun-02 5:07
Steve L.13-Jun-02 5:07 
GeneralRe: associate data with tree item's Pin
Chris Losinger13-Jun-02 5:40
professionalChris Losinger13-Jun-02 5:40 
GeneralRe: associate data with tree item's Pin
MightyThor15-Jul-02 9:25
MightyThor15-Jul-02 9:25 
GeneralRe: associate data with tree item's Pin
Chris Losinger15-Jul-02 10:19
professionalChris Losinger15-Jul-02 10:19 
GeneralWhere is BIF_USENEWUI defined? MSDN says i can use it but VC says unknown identifier. Pin
redeemer13-Jun-02 2:50
redeemer13-Jun-02 2:50 
GeneralRe: Where is BIF_USENEWUI defined? MSDN says i can use it but VC says unknown identifier. Pin
Rama Krishna Vavilala13-Jun-02 3:06
Rama Krishna Vavilala13-Jun-02 3:06 
GeneralRe: Where is BIF_USENEWUI defined? MSDN says i can use it but VC says unknown identifier. Pin
redeemer13-Jun-02 3:43
redeemer13-Jun-02 3:43 
GeneralRe: Where is BIF_USENEWUI defined? MSDN says i can use it but VC says unknown identifier. Pin
Rama Krishna Vavilala13-Jun-02 3:52
Rama Krishna Vavilala13-Jun-02 3:52 
GeneralRe: Where is BIF_USENEWUI defined? MSDN says i can use it but VC says unknown identifier. Pin
redeemer13-Jun-02 3:58
redeemer13-Jun-02 3:58 
GeneralRe: Where is BIF_USENEWUI defined? MSDN says i can use it but VC says unknown identifier. Pin
Rama Krishna Vavilala13-Jun-02 6:49
Rama Krishna Vavilala13-Jun-02 6:49 
GeneralRe: Where is BIF_USENEWUI defined? MSDN says i can use it but VC says unknown identifier. Pin
James R. Twine13-Jun-02 18:02
James R. Twine13-Jun-02 18:02 
QuestionHow do i get an the iItem property of an item in a ListView if i have it's lParam value? Pin
redeemer13-Jun-02 1:40
redeemer13-Jun-02 1:40 
AnswerRe: How do i get an the iItem property of an item in a ListView if i have it's lParam value? Pin
13-Jun-02 1:53
suss13-Jun-02 1:53 
GeneralRe: How do i get an the iItem property of an item in a ListView if i have it's lParam value? Pin
redeemer13-Jun-02 2:01
redeemer13-Jun-02 2:01 
GeneralRe: How do i get an the iItem property of an item in a ListView if i have it's lParam value? Pin
srinivas vaithianathan13-Jun-02 8:17
srinivas vaithianathan13-Jun-02 8:17 
GeneralAdd MFC support to ATL project Pin
Hans Ruck13-Jun-02 0:52
Hans Ruck13-Jun-02 0:52 
GeneralRe: Add MFC support to ATL project Pin
Rama Krishna Vavilala13-Jun-02 1:02
Rama Krishna Vavilala13-Jun-02 1:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.