1. Was required to termination Loop in the user function (not LiteCAD) on the ESC key.
Thus the cursor is in the LiteCAD DWG window.
Function requests from the user of pair of points and directly processes them.
For the ESC key VirtKey parameter = 27
Here is how it looks (userutils1.c):
int intKey; // to bipass ESC in loop while()
void CALLBACK KeyDown (HANDLE hWnd, int VirtKey, int Flags, BOOL bCtrl, BOOL bShift )
{
if ( VirtKey == 27 ) { intKey = VirtKey; }
}
void GetStrelka12 (float fArrowScale)
{
... ... ...
// do user-cicle for entering pair-points 1-2
while ( 1 )
{
lcOnEventKeyDown ( KeyDown ); // !!! Invoke CALLBACK-function
if ( intKey == 27 )
{
MessageBox( NULL, TEXT("the key ESCAPE is pressed"), TEXT("Event2"), MB_OK);
break; // terminate loop while()
}
... ... ...
}
}
2. For faster (than from the menu) a call of the LiteCAD functions added two ToolBar panels:
HWND CreateTbarMain ( HWND hWndParent, HINSTANCE hInst );
HWND CreateTbarDraw ( HWND hWndParent, HINSTANCE hInst );
Used toolbar.bmp and draw.bmp from VeCAD
(in LiteCAD source codes these bitmap of a panel unfortunately are absent).
It is necessary to add vertical panels edit.bmp, format.bmp, dims.bmp, tbsnap.bmp,
but while it turns out badly - vertical-splitter ceases to work, there are other ghost effects.