Article | 41023716 |
Type | Bug |
Product | Engine |
Version | 5.0.0.1033 |
Date Added | 9/23/2004 |
Fixed | Yes [9/23/2004] |
Submitted by | Christer @ Terra |
Keywords |
A new method PostCommandId and a new event CommandId was added in 5.0.1.1034
For example if the developer wants to call cmdLine method on a toolbar button click ,can alternatively call the PostCommandId with a unique id and then call the CmdLine command inside the CommandId event.
PostCommandId places an user windows message at the bottom of the windows messages stack.
When all previous windows messages in the stack been translated then the CommandId event will be fired with the specific Id.
example:
private void
toolBar2_ButtonClick(object sender, TD.SandBar.ToolBarItemEventArgs e)
{
axVDPro1.PostCommandId (101);
}
private
void axVDPro1_CommandId(object sender, AxVDProLib5._DVdrawEvents_CommandIdEvent e)
{
switch(e.cmdid)
{
case 101:
axVDPro1.CommandAction.CmdLine("USER");
break;
default:
break;
}
}