我制作了个 RC 文件 
DialogBox(g_hInst, MAKEINTRESOURCE(IDD_DIALOG1), hWnd, (DLGPROC)DlgMainProc) ;问下如何 给listbox 控件 增加选项如何用 SDK 语言 

解决方案 »

  1.   

    ListBox的操作比较简单
    1添加数据
    声明控件变量的类别为Control,变量类型为CListBox,变量名为m_ListBox_Content.
    m_ListBox_Content.AddString(_T("123"));
    m_ListBox_Content.AddString(_T("汉字"));
    m_ListBox_Content.AddString(_T("English"));
    m_ListBox_Content.AddString(_T("!@#$%^&*()"));
    2获取数据
    CString s;
    m_ListBox_Content.GetText(1,s);
    MessageBox(s,_T("取得第2行数据"),MB_OK);
    s.ReleaseBuffer();
      

  2.   

    GetDlgItem(hWnd,控件Id)->AddString(_T("123"));