我正在处理 MFC,我想将字符串添加到组合框。 与添加数据(在资源 View 中的组合框属性中进行硬编码)不同,我想将它们添加到字符串表中,而我的 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 ???
关于c++ - MFC中如何给组合框添加字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29089936/