- UID
- 1
- 积分
- 16111
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-1-3
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
How to send ctrl+c/escape to the AutoCAD command line with sendmessage()?
ID 2549
Applies to: AutoCAD 2000
Date 5/10/2000
This document is part of ObjectARX MFC
Question
How can I send Ctrl+C/Escape to the AutoCAD command line with SendMessage()?
Answer
Using the COPYDATASTRUCT structure you have to send the 0x1B (=27) character,
which corresponds to the ESCAPE key, to the command line.
// Canceling all the running commands
CString cmd (_T("\x1B\x1B")) ;
COPYDATASTRUCT cmdMsg ;
cmdMsg.dwData =(DWORD)1 ;
cmdMsg.cbData =(DWORD)_tcslen(cmd) + 1 ;
cmdMsg.lpData =cmd.GetBuffer (cmd.GetLength () + 1) ;
::SendMessage (acedGetAcadFrame ()->m_hWnd, WM_COPYDATA, NULL, (LPARAM)&cmdMsg)
; |
|