开发平台(Platform): (Ex: Win10, Linux, ...)
WIN7
编译器(Ex: GCC, clang, VC++...)+目标环境(跟开发平台不同的话需列出)
MFC2003
额外使用到的函数库(Library Used): (Ex: OpenGL, ...)
问题(Question):
如题 小弟想要在按下某个按钮时出现一个Dialog
由于不想让FUNCTION里运算的资料停下来
所以我做了一个Modeless的Dialog让它可以边运算边显示Dialog
点选按钮后会跳出Messagebox
如果是IDOK
则出现Dialog
可能是因为create的特性出现的Dialog不是完整的(只显示title)
喂入的资料(Input):
预期的正确结果(Expected Output):
错误结果(Wrong Output):
Dialog 里 CStatic 及两个button无法显示
程式码(Code):(请善用置底文网页, 记得排版,禁止使用图档)
void Function()
{
pModeless = new CModeless(this);
pModeless->create(IDD_DIALOG);
pModeless->ShowWindow(SW_HIDE);
呼叫Messagebox
Switch 是否为IDOK
{
pModeless->ShowWindow(SW_SHOW);
计算...
...
}
if(pModeless != NULL)
pModeless->OnCancel();
}
补充说明(Supplement):
请各位高手给小弟一点意见