How to access a controls in property sheet.
-
hi all, i want to access the control values from one property sheet in another property sheet. (ie) if i am having three property pages and i want to get the control values of the first property page in second how can i achieve it. please provide the solution. i am giving a snippet of code. //============================== CPropertySheet dlg(_T("Hellow"), this, 0); one a; two b; three c; dlg.AddPage(&a); dlg.AddPage(&b); dlg.AddPage(&c); dlg.DoModal(); //================================= where one,two,three are the the PropertyPages where each property page contains its controls, i want to access this values in different pages. please provide me a solution. one solution is using global variable and set the values into globals but i dont want to use any global variables. thanks and regards, uday. uday kiran
-
hi all, i want to access the control values from one property sheet in another property sheet. (ie) if i am having three property pages and i want to get the control values of the first property page in second how can i achieve it. please provide the solution. i am giving a snippet of code. //============================== CPropertySheet dlg(_T("Hellow"), this, 0); one a; two b; three c; dlg.AddPage(&a); dlg.AddPage(&b); dlg.AddPage(&c); dlg.DoModal(); //================================= where one,two,three are the the PropertyPages where each property page contains its controls, i want to access this values in different pages. please provide me a solution. one solution is using global variable and set the values into globals but i dont want to use any global variables. thanks and regards, uday. uday kiran
Use
QuerySiblings
.
Nibu thomas Software Developer
-
hi all, i want to access the control values from one property sheet in another property sheet. (ie) if i am having three property pages and i want to get the control values of the first property page in second how can i achieve it. please provide the solution. i am giving a snippet of code. //============================== CPropertySheet dlg(_T("Hellow"), this, 0); one a; two b; three c; dlg.AddPage(&a); dlg.AddPage(&b); dlg.AddPage(&c); dlg.DoModal(); //================================= where one,two,three are the the PropertyPages where each property page contains its controls, i want to access this values in different pages. please provide me a solution. one solution is using global variable and set the values into globals but i dont want to use any global variables. thanks and regards, uday. uday kiran
Create a class/struct that represents all of the data for each of the pages. Create an instance of this class/struct in the property sheet. Each time a page is activated, it will query this class/struct to initialize the controls. Each time a page is deactivated, it will update the class/struct with the control values. Make sense?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb