In Object Arx [Model dialog change into Modelless dialog]

 Dear Friends,

//Before run this below code, dialog become Model

SendMessage(WM_CLOSE_SYMDLG); //Call CloseACMDialog(WPARAM wParam, LPARAM lParam)

TCHAR pszInput[MAX_PATH];
CString strMsg=_T("Enter number");
int nRet =acedGetString(1,strMsg,pszInput);
if( nRet != RTNORM)
{
return;
}


CString strInput=pszInput;
SendMessage(WM_SHOW_SYMDLG); //Call OpenACMDialog(WPARAM wParam, LPARAM lParam)

 

//------------------------------------------------ ------------------------------
LRESULT CRunModelDLG::CloseACMDialog(WPARAM wParam, LPARAM lParam)
{
PostMessage (WM_KEYDOWN,VK_ESCAPE,0);
EndModalLoop (RunModalLoop (MLF_SHOWONIDLE));
return TRUE;
}
//------------------------------------------------ ------------------------------
LRESULT CRunModelDLG::OpenACMDialog(WPARAM wParam, LPARAM lParam)
{
ShowWindow(SW_SHOW);
RunModalLoop(MLF_SHOWONIDLE);
return TRUE;
}
//------------------------------------------------ ------------------------------

//After run above code, dialog become Modelless

 

Problem in RunModalllop

How to maintain the dialog is Model?


With Regards,

N.Vijayaraghavan.