Product : Engine, Version : 5.0.0.1033, ArticleID : 41023716

Bug : VectorDraw do not process the commandaction message loops when used with some third party toolbar controls

Article41023716
TypeBug
ProductEngine
Version5.0.0.1033
Date Added9/23/2004
FixedYes [9/23/2004]
Submitted byChrister @ Terra
Keywords

Subject

VectorDraw do not process the commandaction message loops when used with some third party toolbar controls

Summary

Solution

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;
 }
}