MFC中如何给组合框添加字符串

How to add strings to the combo box in MFC

我正在使用 MFC,我想将字符串添加到组合框。 与添加数据(在资源视图中的组合框属性中进行硬编码)不同,我想将它们添加到字符串 table 并且我的 C++ 代码必须加载字符串。

请多多指教。

- Add combo box to your dialog control
- Right click combo box , goto class wizard and add member variable of type CCombobox [control varable]
-This will add DDX_Control entry
- Now call variable_name.AddString to add strings to your combo box at runtime.
- If you want to use strings from string table then use Loadstring to load a string from string table first.
- Then call variable_name.AddString again ...

.... Have I cleared your doubts ???