如何将变量从一个属性页传递到另一个属性页? [英] how to pass variables from one propertypage to another?

查看:153
本文介绍了如何将变量从一个属性页传递到另一个属性页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好..我正在设计MFC应用程序...我在PropertySheet上附加了2个属性页...我需要知道如何将变量从1个属性页传递给另一个属性页.例如...我我分别为2个属性页面的PropertyPage1和PropertyPage2提供了单独的类..我在PropertyPage1类中声明了一个公共变量CString测试....我需要此测试变量在PropertyPage2类中使用...如何通过
此变量...

Hello guys..I am designing an MFC application...I have 2 property pages attached to PropertySheet...I need to know how we can pass variables from 1 property page to another..for example...I have separate classes for 2 property pages PropertyPage1 and PropertyPage2 respectively..I have a public variable CString test decalared in PropertyPage1 class....I need this test varaible to be used in PropertyPage2 class...how can i pass
this variable...

推荐答案

您有两个单独的属性页类,可能是由同一对象创建的,即属性表的实例:您应该使用诸如中介之类的属性表对象将值从一页传递到另一页.
本文:"对话框通信"说明了如何交换数据;艰难的情况是完全不同的,技术是相当普遍的.
:)
You have two separate property page classes, probably created by the same object, i.e. an instance of the property sheet: you should use such property sheet object as intermediary to pass values from one page to the other one.
This article: "Dialogs Communication" explains how to to exchange data; tough the scenario is quite different, the technique is quite general.
:)


这篇关于如何将变量从一个属性页传递到另一个属性页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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