custom SIP with display box

J

Jay

I have a custom Soft Input Panel in my CE 5.01 device.
The SIP is very big - it almost occupies the entire screen on the CE device.
I want to have a "text" box on the SIP that displays the text as the user
types in.
When they click "oK" on the SIP - I tranfer the text on to the apps edit
box.
All works well until now.

The problemas are:
1. When the user types in say "qwe" on the apps edit box and chooses to
popup the SIP - and type in the rest of the text there - I want to populate
my SIP text box with "qwe". When the user is done typing - I will send the
whole text "qwe" + "asd" back to the apps text box.

How can I have this communication happen from the app to the SIP?
NOTE: I am not invoking the SIP from the app. There is a button on my common
tool bar that pops up SIP. I dont want to put any code into my app - as
there are going to be many apps that use this common SIP.

2. When the app text box is a "password" field and I popup the SIP and
start typing - I see the actual text appearing on my custom SIP text box.
(not *).
How can I make my custom SIP know that it is a password field - and that I
need to set the SIP text box to "password" field.?

I am not sure if anyone ever tried this..Any help on this is appreciated.
 
P

Paul G. Tobey [eMVP]

1. This is not the way SIP was designed to work. It's tying it so closely
to your application desires that I'd say that you should forget about having
a general SIP and just have the text entry box be part of your application.
I suppose that you could do something like this to get the existing text:

GetWindowText( GetForegroundWindow(), &buffer, buffersize );

but I don't think that this will or should work, generally. It's none of
the SIP's business what text is already in the edit field (what if it's not
your application that is in front?). You'd be better off to have the
application(s) call out to a DLL that exports the data entry form and tell
it what the current text is, etc.

2. GetWindowLong( hWnd, GWL_STYLE ); // It could be GWL_EXSTYLE, too.
I'm not sure about that, but you're looking for ES_PASSWORD in the style
field.

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top