Combo Box ::MFC

This is a discussion on Combo Box ::MFC within the Windows Programming forums, part of the Platform Specific Boards category; How to i insert item into the combo box using coding im using MFC dialog...

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    77

    Combo Box ::MFC

    How to i insert item into the combo box using coding
    im using MFC dialog

  2. #2
    Unregistered
    Guest

    Cool

    One of the way is to use GetDlgItem with combobox resource id & cast it to CComboBox MFC class & then use AddString member to add an item.

    CComboBox p_cbox = (CComboBox*) GetDlgItem(/* combobox rc id */);

    p_cbox->AddString("Item1");

    OR u can use DDX mechanism..

    OR u can use subclassing

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Create new combo boxes based on items selected in preview combo box
    By RealityFusion in forum Windows Programming
    Replies: 2
    Last Post: 01-10-2007, 09:50 AM
  2. No data showing in combo box
    By PJYelton in forum Windows Programming
    Replies: 6
    Last Post: 04-29-2005, 08:20 PM
  3. How to program a "back" button with MFC
    By 99atlantic in forum Windows Programming
    Replies: 3
    Last Post: 04-26-2005, 09:34 PM
  4. New Theme
    By XSquared in forum A Brief History of Cprogramming.com
    Replies: 160
    Last Post: 04-01-2004, 08:00 PM
  5. Combo Box in MFC, how to randomize data of it...please help!
    By Unregistered in forum Windows Programming
    Replies: 3
    Last Post: 06-24-2002, 03:26 AM

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