Link to home
Start Free TrialLog in
Avatar of Gopakumar
Gopakumar

asked on

Dialog Window

I have dialog with 2 buttons. When I click on button1 a modeless window (windows1)should open in a paritcular position and when i click button2 another modeless window(window2) should open. But when I click button2 windows1 is not getting replaced with windows2. Please refer the code below and tell me i can i do this

void CTestDlg::OnButton1()
{
            
CModless1 *dlg = new CModless1 ();
dlg->Create(IDD_FORMVIEW,this);
dlg->ShowWindow(SW_SHOW);
dlg->SetWindowPos(0,100,0,0,0,SWP_NOSIZE|SWP_SHOWWINDOW);


}

void CTestDlg::OnButton2()
{
CModless2 *dlg = new CModless2 ();
dlg->Create(IDD_FORMVIEW1,this);
dlg->ShowWindow(SW_SHOW);
dlg->SetWindowPos(0,100,0,0,0,SWP_NOSIZE|SWP_SHOWWINDOW);
}
ASKER CERTIFIED SOLUTION
Avatar of AliYates
AliYates

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial