How to set values in CPageSetupDialog?
-
hi all, i want to set values to CPageSetupDialog,before open this dialog like: paper size,sorce,orientation and margin. how can i do this thanks. thanks.
-
Use the
m_psd
member of theCPageSetupDialog
[^].Use the best guess
-
hi all, i want to set values to CPageSetupDialog,before open this dialog like: paper size,sorce,orientation and margin. how can i do this thanks. thanks.
may be this help u... :) u may have dialog class like,
CPageSetupDialog abc;
//Conding to set values.
abc.papersize = 10;
abc.sorce = "ACC";
abc.margin = 44;
//ETC.
//And then modal it..Like,
if(abc.DoModal() == IKOK)
{
//Success;
}else
{
//Fail..
} -
may be this help u... :) u may have dialog class like,
CPageSetupDialog abc;
//Conding to set values.
abc.papersize = 10;
abc.sorce = "ACC";
abc.margin = 44;
//ETC.
//And then modal it..Like,
if(abc.DoModal() == IKOK)
{
//Success;
}else
{
//Fail..
}Coder Block wrote:
CPageSetupDialog abc; //Conding to set values. abc.papersize = 10; abc.sorce = "ACC"; abc.margin = 44; //ETC. //And then modal it..Like, if(abc.DoModal() == IKOK) { //Success; }else { //Fail.. }
gives error
error C2039: 'margin' : is not a member of 'CPageSetupDialog'
error C2039: 'papersize' : is not a member of 'CPageSetupDialog'
error C2039: 'sorce' : is not a member of 'CPageSetupDialog' -
Coder Block wrote:
CPageSetupDialog abc; //Conding to set values. abc.papersize = 10; abc.sorce = "ACC"; abc.margin = 44; //ETC. //And then modal it..Like, if(abc.DoModal() == IKOK) { //Success; }else { //Fail.. }
gives error
error C2039: 'margin' : is not a member of 'CPageSetupDialog'
error C2039: 'papersize' : is not a member of 'CPageSetupDialog'
error C2039: 'sorce' : is not a member of 'CPageSetupDialog'Read the docs, PLEASE!
abc.m_psd.ptPaperSize = 10;
abc.m_psd.rtMargin = 44;
..."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
-
Coder Block wrote:
CPageSetupDialog abc; //Conding to set values. abc.papersize = 10; abc.sorce = "ACC"; abc.margin = 44; //ETC. //And then modal it..Like, if(abc.DoModal() == IKOK) { //Success; }else { //Fail.. }
gives error
error C2039: 'margin' : is not a member of 'CPageSetupDialog'
error C2039: 'papersize' : is not a member of 'CPageSetupDialog'
error C2039: 'sorce' : is not a member of 'CPageSetupDialog'As usual declare all this in .h file of CPageSetupDialog..