In the non-mode dialog box, use acedcommand () to return error-5001.

Source: Internet
Author: User

When acedcommand () is used in the non-mode dialog box, error-5001 is returned. The ObjectARX document describes the following:

Code differences under the application execution Context

In the case of modeless dialogs and external process-generated ActiveX requests, the Code must lock the statements, including the current document. the use of the iacaddocument Methods startundomarker () and endundomarker () will apply a kwritelock to the document.

Solution: Use sendmessage () or sendstringtoexecute () instead of acedcommand.
Cstring strcmd;
Strcmd. Format ("UCS/nm/NZ/n % F/N", Z );
For (INT I = 0; I <strcmd. getlength (); I ++ ){
: Sendmessage (acedgetacadtextcmdline ()-> m_hwnd, wm_char, strcmd [I], 1l );
}

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.