如何在MFC应用程序中初始化子对话框中的settimer? [英] How to initialise settimer in child dialog in MFC application?

查看:87
本文介绍了如何在MFC应用程序中初始化子对话框中的settimer?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在子对话框中初始化SetTimer命令,以便在该对话框中立即更新值。在第一个对话框中按下按钮时,将打开子对话框。我在子对话框中甚至没有OnInitDialog()。 OnInitDialog的用途是什么?

假设我能够初始化SetTimer,关闭对话框时如何停止计时器?



我尝试了什么:



我尝试在构造函数中初始化,但我无法运行应用程序。

I need to initialize SetTimer command in the child dialog for updating values instantly in that dialog itself. The child dialog opens when a button is pressed in the first dialog. I don't even have OnInitDialog() in child dialog. What is the use of OnInitDialog?
And suppose if I am able to achieve initialising SetTimer, How can I stop the timer when I close the dialog?

What I have tried:

I tried initialising in the constructor, but I couldn't run the application.

推荐答案

这似乎与我的显示器不会立即用MFC应用程序中的GUI时间更新 [ ^ ]。请编辑该问题并添加对问题的正确解释。
This appears to be the same issue as My display is not instantly updating with the time in GUI in MFC application[^]. Please edit that question and add a proper explanation of what your problem is.


这篇关于如何在MFC应用程序中初始化子对话框中的settimer?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆