【发布时间】:2011-09-15 13:35:05
【问题描述】:
我在 Embarcadero 或 Borland C++ 中使用带有默认字符串的 InputBox 组件。 Cancel 键返回与 Enter 按钮相同的默认字符串。
根据文档,取消键应该返回一个空字符串。
String s = InputBox("Title", "Prompt", "Default");
if (s == "") return; // Cancel key pressed
... use string s
我在 VB 中看到了使用 StrPtr 的解决方案。 C ++中有等价物吗? VB6 InputBox Cancel
【问题讨论】:
标签: c++ c++builder