Prod.: Engine, ver.: 6, ID: 60000304, HowTo : How to overcome focus problem when you want to show a modal dialog after a DblClick event of vdraw.

HowTo : How to overcome focus problem when you want to show a modal dialog after a DblClick event of vdraw.

Article60000304
TypeHowTo
ProductEngine
Version6
Date Added11/2/2007
Submitted byDavid Coster
Keywords

Subject

How to overcome focus problem when you want to show a modal dialog after a DblClick event of vdraw.

Summary

In Wrapper when DblClick occurs the modal form that is shown in this event's handler do not have the focus.

Solution

*** This solution applies to 6009 version and above ***

You can easily overcome this by using CommandID event and PostCommandID method. See the code below :
 
void CAdd3dEntitiesDlg::DblClickVdpro1()
{
    m_vdraw.PostCommandId(555);
}

void CAdd3dEntitiesDlg::CommandIdVdpro1(long cmdid)
{
    if(cmdid == 555){
        MyTest Dlg;
        Dlg.DoModal();
    }
}