Click here to Skip to main content
15,916,835 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Unable to change menus in Visual C++ 6 Pin
Oliver Christian Kjær10-Oct-03 2:29
Oliver Christian Kjær10-Oct-03 2:29 
GeneralRe: Unable to change menus in Visual C++ 6 Pin
Oliver Christian Kjær10-Oct-03 3:28
Oliver Christian Kjær10-Oct-03 3:28 
GeneralRe: Unable to change menus in Visual C++ 6 Pin
Steve S13-Oct-03 5:31
Steve S13-Oct-03 5:31 
GeneralRe: Unable to change menus in Visual C++ 6 Pin
Oliver Christian Kjær14-Oct-03 21:41
Oliver Christian Kjær14-Oct-03 21:41 
Generalfloat precision Pin
OO-P10-Oct-03 1:11
OO-P10-Oct-03 1:11 
GeneralRe: float precision Pin
Anthony_Yio10-Oct-03 1:33
Anthony_Yio10-Oct-03 1:33 
GeneralRichEdit with Treeview - associating and saving Pin
Kayembi10-Oct-03 0:49
Kayembi10-Oct-03 0:49 
GeneralRe: RichEdit with Treeview - associating and saving Pin
Steve S10-Oct-03 1:42
Steve S10-Oct-03 1:42 
OK, I'll bite; it's not like I was busy or nuffink.

A tree view item can have an arbitrary piece of data associated with it. This is not predefined or limited to what it can be (outside the fact it's an LPARAM in size). This means it can be the index in an array of CStrings, or a pointer to a CString, or anything you want it to be.

When you select a tree item, you can then ask what it's data is, and use that as the basis for locating/displaying.

There's a caveat. You might need to manage the freeing of such data when items are deleted from the tree, either all at once, or one at a time. Experiment in DEBUG mode if you're using MFC and you'll find out if you've new-ed without a delete, although reading the documentation could tell you as well Poke tongue | ;-P

Steve S
GeneralMFC printing: size and orientation Pin
zsnow9-Oct-03 23:40
zsnow9-Oct-03 23:40 
GeneralRe: MFC printing: size and orientation Pin
Steve S10-Oct-03 1:39
Steve S10-Oct-03 1:39 
GeneralRe: MFC printing: size and orientation Pin
zsnow10-Oct-03 2:14
zsnow10-Oct-03 2:14 
GeneralRe: MFC printing: size and orientation Pin
Steve S10-Oct-03 4:48
Steve S10-Oct-03 4:48 
GeneralRe: MFC printing: size and orientation Pin
Steve S10-Oct-03 4:56
Steve S10-Oct-03 4:56 
GeneralPrintDlgEx Pin
«_Superman_»9-Oct-03 23:11
professional«_Superman_»9-Oct-03 23:11 
GeneralAn interesting code Pin
FlyingDancer9-Oct-03 21:44
FlyingDancer9-Oct-03 21:44 
GeneralWhat does this do? Pin
Joaquín M López Muñoz9-Oct-03 21:51
Joaquín M López Muñoz9-Oct-03 21:51 
GeneralRe: What does this do? Pin
FlyingDancer9-Oct-03 22:20
FlyingDancer9-Oct-03 22:20 
GeneralRe: What does this do? Pin
jhwurmbach9-Oct-03 22:44
jhwurmbach9-Oct-03 22:44 
GeneralRe: What does this do? Pin
FlyingDancer9-Oct-03 23:24
FlyingDancer9-Oct-03 23:24 
GeneralRe: What does this do? Pin
jhwurmbach10-Oct-03 1:31
jhwurmbach10-Oct-03 1:31 
GeneralRe: What does this do? Pin
Steve S10-Oct-03 1:44
Steve S10-Oct-03 1:44 
GeneralRe: What does this do? Pin
jhwurmbach10-Oct-03 1:50
jhwurmbach10-Oct-03 1:50 
GeneralRe: What does this do? Pin
Steve S10-Oct-03 2:01
Steve S10-Oct-03 2:01 
GeneralRe: What does this do? Pin
FlyingDancer11-Oct-03 5:18
FlyingDancer11-Oct-03 5:18 
GeneralRe: What does this do? Pin
Joaquín M López Muñoz10-Oct-03 3:06
Joaquín M López Muñoz10-Oct-03 3:06 

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.