quick question
-
what is the command for getting a pointer to the document class from a dialog class. Sorry if this is a basic question, but I don't seem to know how to get variables from the doc class from my document class Q-Bus
Add a member variable for your dialog class to store the pointer to the document. After instantiating but before calling your dialog, assign the pointer for your document class to this new member variable.
Have you answered an MTQ? Check out the stats!
What's the latest butt-scratch count? Check it out! -
Add a member variable for your dialog class to store the pointer to the document. After instantiating but before calling your dialog, assign the pointer for your document class to this new member variable.
Have you answered an MTQ? Check out the stats!
What's the latest butt-scratch count? Check it out!Create the dialog box in Document class. if var1 and var2 are 2 variables of document class to be used by dialog class. if var3 and var4 are variables of dialog box class. CMyDoc::MyFunc() { CMyDialog Mydlg; Mydlg.var3 = var1; Mydlg.var4 = var2; if(Mydlg.DoModal()= IDOK) { var1 = Mydlg.var3; var2 = Mydlg.var4; } } never say die