访问对话框类中的app类 [英] accessing app class in dialog class

查看:120
本文介绍了访问对话框类中的app类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Dialog类中访问App类API?请告诉我。

解决方案

例如,您可以使用 AfxGetApp [ ^ ]获取指向你App类的函数(你必须强制转换获得的 CWinaApp 指针)。

你可能还会公开应用程序对象的实例 theApp (例如,参见theApp [ ^ ]。

How to access App class API in Dialog class? Please let me know.

解决方案

You might, for instance use the AfxGetApp[^] function to gain a pointer to you App class (you have to cast the obtained CWinaApp pointer).
You might also expose the instance of the application object theApp (see, for instance "theApp"[^].


这篇关于访问对话框类中的app类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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