开发者

CDialog ShowWindow problem

I have a SDI application. In the application there's a modeless dialog which is used to show some message like communicating with the server during doing work. Question is, when the dialog's parent window is set to main frame, the ShowWindow method doesn't work as expected. It seems that the dialog is covered by the main frame. If I put a Sleep call next to ShowWindow call, I can see the dialog. And when Sleep ends, the dialog disappear.If I don't set the dialog's parent, the ShowWindow call works normally. But I do want to set the dialog's parent window. So how to sovle i开发者_Go百科t ?


The thing with the 'sleep' making it work for a while makes me think you're creating the dialog on the stack and it's going out of scope, therefore destroying itself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜