Hidden Columns

This is a discussion on Hidden Columns within the Windows Programming forums, part of the Platform Specific Boards category; Hi. In my program I'm getting data for one ListView from a database. I want to implement right click pop ...

  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    87

    Hidden Columns

    Hi.

    In my program I'm getting data for one ListView from a database. I want to implement right click pop up menu for this ListView so I can manipulate the contents in the list view.
    So my question is: Is there any way to keep the ID from the database in some "hidden column" in the list view so when the user clicks on an item I can directly get the ID of that item for example for deleting or editing.

    I'm just curious: Is there any way to keep aditional data in comboboxes too?

    P.S. Sorry for my bed English.

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    For the list view control have a look at the lParam member of the LVITEM struct. To set this value using ListView_SetItem or retrieve it using ListView_GetItem the mask value must include LVIF_PARAM.

    For a combo box control have a look at the CB_SETITEMDATA and CB_GETITEMDATA messages.

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    329
    Or you could just set the columnwidth to 0 for the hidden column.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Hidden the information --Help!! (T.T)
    By nghoanglinh223 in forum C++ Programming
    Replies: 4
    Last Post: 04-01-2008, 09:07 AM
  2. Formatting output into even columns?
    By Uncle Rico in forum C Programming
    Replies: 2
    Last Post: 08-16-2005, 05:10 PM
  3. Program that prints numbers in columns
    By rayrayj52 in forum C++ Programming
    Replies: 12
    Last Post: 09-20-2004, 02:43 PM
  4. can the procedure in the program be hidden?
    By Jasonymk in forum C++ Programming
    Replies: 7
    Last Post: 07-24-2003, 04:44 PM
  5. Number of columns in ListControl
    By MPSoutine in forum Windows Programming
    Replies: 3
    Last Post: 03-28-2003, 01:29 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21