Author Topic: How to accept Spacebar as a char when in the acquireString function?  (Read 5308 times)

0 Members and 1 Guest are viewing this topic.

highflyingbird

  • Bull Frog
  • Posts: 415
  • Later equals never.
A JIG project,I meet a problem:
How to accept  Spacebar  as a char,not as a return ,  when  I using  the acquireString function?
Like this:
Code - C++: [Select]
  1.                 setUserInputControls ((AcEdJig::UserInputControls) (m_flag)) ;
  2.                 TCHAR * pStr= new TCHAR[1024];
  3.                 //status = acquireString(m_strInput.GetBuffer(1024));  
  4.                 status = acquireString(pStr);  
  5.                 m_strInput.Format(_T("%s"),pStr);
  6.                 delete [] pStr;
  7.                 pStr = NULL;
  8.  
I am a bilingualist,Chinese and Chinglish.

owenwengerd

  • Bull Frog
  • Posts: 444
Re: How to accept Spacebar as a char when in the acquireString function?
« Reply #1 on: July 19, 2013, 03:18:06 PM »
Which flags are you passing to setUserInputControls()?

highflyingbird

  • Bull Frog
  • Posts: 415
  • Later equals never.
Re: How to accept Spacebar as a char when in the acquireString function?
« Reply #2 on: July 20, 2013, 10:19:26 AM »
kGovernedByOrthoMode &
kDontEchoCancelForCtrlC &
kNoDwgLimitsChecking &
kAccept3dCoordinates &
kAcceptOtherInputString

This is my  UserInputControls flag.
Thanks.
I am a bilingualist,Chinese and Chinglish.

owenwengerd

  • Bull Frog
  • Posts: 444
Re: How to accept Spacebar as a char when in the acquireString function?
« Reply #3 on: July 20, 2013, 10:03:03 PM »
Just a guess, but try removing the kAcceptOtherInputString flag.

highflyingbird

  • Bull Frog
  • Posts: 415
  • Later equals never.
Re: How to accept Spacebar as a char when in the acquireString function?
« Reply #4 on: July 21, 2013, 03:05:01 AM »
Just a guess, but try removing the kAcceptOtherInputString flag.
The same problem.
If use Vlisp, just like this:
Code - Text: [Select]
  1. (vla-getstring uti :vlax-true  "\nPlease enter your string:")
but I don't know how to set the  vlax-true  when getstring  in arx.
I am a bilingualist,Chinese and Chinglish.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: How to accept Spacebar as a char when in the acquireString function?
« Reply #5 on: July 21, 2013, 04:44:14 AM »

Have you tried kAnyBlankTerminatesInput ?
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

highflyingbird

  • Bull Frog
  • Posts: 415
  • Later equals never.
Re: How to accept Spacebar as a char when in the acquireString function?
« Reply #6 on: July 21, 2013, 05:43:24 AM »

Have you tried kAnyBlankTerminatesInput ?
No,I havn't.
I will try it.
I am a bilingualist,Chinese and Chinglish.

highflyingbird

  • Bull Frog
  • Posts: 415
  • Later equals never.
Re: How to accept Spacebar as a char when in the acquireString function?
« Reply #7 on: July 23, 2013, 12:32:01 AM »
I posted my project  file to here, wish someone can help me!
Thank you  very much.
I am a bilingualist,Chinese and Chinglish.

highflyingbird

  • Bull Frog
  • Posts: 415
  • Later equals never.
Re: How to accept Spacebar as a char when in the acquireString function?
« Reply #8 on: August 07, 2013, 04:36:23 AM »
All the ways I have tried,even  I used the acedRemoveWatchWinMsg function to catch the keyboard inputting message,but the problem is still in here...
 :-(
« Last Edit: August 10, 2013, 05:52:45 AM by highflyingbird »
I am a bilingualist,Chinese and Chinglish.

owenwengerd

  • Bull Frog
  • Posts: 444
Re: How to accept Spacebar as a char when in the acquireString function?
« Reply #9 on: August 07, 2013, 10:48:53 AM »
I suggest to post in the ObjectARX discussion group to see if someone from Autodesk can help.

highflyingbird

  • Bull Frog
  • Posts: 415
  • Later equals never.
Re: How to accept Spacebar as a char when in the acquireString function?
« Reply #10 on: August 11, 2013, 09:43:25 PM »
I suggest to post in the ObjectARX discussion group to see if someone from Autodesk can help.
Yes,I did.Thank your advice. but  sometimes I guess  , maybe, it's a bug .
I am a bilingualist,Chinese and Chinglish.