HowTo : How to overcome focus problem when you want to show a modal dialog after a DblClick event of vdraw.
Article | 60000304 |
Type | HowTo |
Product | Engine |
Version | 6 |
Date Added | 11/2/2007 |
Submitted by | David 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();
}
}