Thread: List Box?

  1. #1
    BubbleMan
    Guest

    Question List Box?

    I am making a program. How do I make a drop-down box that lists the files on e:\(or d:\) drives? And how do I tell what the user selects?

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    With the WIN32 API (VISUAL C no++) using MS DevStudio

    In Dropdown style combobox
    Process WM_COMMAND messages using a switch to the combobox ID
    eg
    case COMBOBOX:
    if(HIWORD(wParam)==CBN_SELCHANGE)
    will tell you if the user has clicked a new item

    A treeview would be better than a dropdown list for a list of ALL files.

    Process WM_NOTIFY messages in the CALLBACK looking for TVN_SELCHANGED messages for the treeview ID
    eg
    case TREEVIEW:
    NMTree = (NM_TREEVIEW FAR *) lParam;
    if(TVN_SELCHANGED==NMTree->hdr.code)

    I think there is a special FLAG to set if you want the treeview to list all files on a drive but I can't find it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sorting linked list please help with CODE
    By scarlet00014 in forum C Programming
    Replies: 3
    Last Post: 09-27-2008, 11:24 PM
  2. Recursion Revisited again, and again!
    By clegs in forum C++ Programming
    Replies: 93
    Last Post: 12-08-2007, 08:02 PM
  3. List box horizontal bar
    By cfriend in forum Windows Programming
    Replies: 1
    Last Post: 09-12-2004, 03:52 PM
  4. Linked List
    By jpipitone in forum C Programming
    Replies: 4
    Last Post: 03-30-2003, 09:27 PM