Loading ...
Sorry, an error occurred while loading the content.
 

Re: [cc2-dev-l] Cancelling ReqData() midway through

Expand Messages
  • Peter Olsson
    ... Chris, Another more stright forward way to do this is to skip the rightclick function and respond to the X_DFLT message that you will get in the Result
    Message 1 of 1 , May 5, 2000
      >I am using ReqData() to get the user to type in a file name at the
      >command line. So far so good, but I also want the user to be able to
      >right-click when prompted for the file name and have my XP command
      >respond by bringing up the Open File dialog. This much I can do: I
      >defined a function that brings up the dialog, and passed the func-
      >tion's address to ReqData() by making it the third parameter of my
      >RDATA structure.


      Chris,

      Another more stright forward way to do this is to skip the rightclick function and respond to the X_DFLT message that you will get in the Result parameter if the user right clicks. THe way to to it would be:

      ReqData();

      In the return proc.

      switch(Result)
      {
      case X_DFLT:
      if(!OpenFileDialog())
      {
      ReqData();
      return;
      }
      // Fall through
      case X_OK:
      // Add your stuff here
      }

      The way of posting messages back to FastCAD via the API is not nice, I have had to use this a couple of times when no other way is available.

      Peter
    Your message has been successfully submitted and would be delivered to recipients shortly.