S
saxenavaibhav17
Actually at some place I am creating object of outcome class.
its taking five argument.
i don't want to give 3 and 4 th argument.
i want to give 1,2 and 5 th argument.
Outcome ot(0,MW_MESSAGE, , ,this);\
previously it was written like this
Outcome ot(0,MW_MESSAGE);
working fine
now situation come i need to give it a handle of parent window so i
need to pass this there.
base condtion is that I don't want to change the architure of
Constructor.
it should be as like as it was.
Outcome:utcome( int retVal, SeverityIndex sevIndex, UINT
uTitleStrID,DWORD dwHelpID, CWnd* pParentWnd/* = NULL*/)
{
m_retVal = retVal;
m_SevIndex = sevIndex;
m_uTitleStrID = uTitleStrID;
// test if it is a valid string id
if( m_uTitleStrID )
{
//MWResourceLoader resLoad;
CString strTitle;
BOOL bValid = strTitle.LoadString(m_uTitleStrID);
ASSERT(bValid);
}
// Set the Help ID
m_dwHelpID = dwHelpID;
m_bChangeMessageBoxButtonLabels = FALSE;
m_pParentWnd = pParentWnd;
}
its taking five argument.
i don't want to give 3 and 4 th argument.
i want to give 1,2 and 5 th argument.
Outcome ot(0,MW_MESSAGE, , ,this);\
previously it was written like this
Outcome ot(0,MW_MESSAGE);
working fine
now situation come i need to give it a handle of parent window so i
need to pass this there.
base condtion is that I don't want to change the architure of
Constructor.
it should be as like as it was.
Outcome:utcome( int retVal, SeverityIndex sevIndex, UINT
uTitleStrID,DWORD dwHelpID, CWnd* pParentWnd/* = NULL*/)
{
m_retVal = retVal;
m_SevIndex = sevIndex;
m_uTitleStrID = uTitleStrID;
// test if it is a valid string id
if( m_uTitleStrID )
{
//MWResourceLoader resLoad;
CString strTitle;
BOOL bValid = strTitle.LoadString(m_uTitleStrID);
ASSERT(bValid);
}
// Set the Help ID
m_dwHelpID = dwHelpID;
m_bChangeMessageBoxButtonLabels = FALSE;
m_pParentWnd = pParentWnd;
}