View Full Version : New Input Mode Selector For Developers Using OpenNetCF
Mike Temporale
10-04-2004, 04:00 PM
<div class='os_post_top_link'><a href='http://blog.opennetcf.org/pfoot/PermaLink.aspx?guid=14575571-0749-428c-8757-99bbaa25920d' target='_blank'>http://blog.opennetcf.org/pfoot/PermaLink.aspx?guid=14575571-0749-428c-8757-99bbaa25920d</a><br /><br /></div><i>"I've uploaded to our online source browser some of the new code which will feature in the next Smart Device Framework release... For Smartphone developers this includes the InputModeEditor which allows you to set a specific input mode for an edit control. Therefore when the control receives focus, the required input mode is automatically selected for the user - useful for numeric only fields or a field where you want to capture some form of text but know that T9 would be inappropriate."</i><br /><br /><img src="http://www.smartphonethoughts.com/images/Temporale-20041004-sdf_logo_fit.png" alt="User submitted image" title="User submitted image"/> <br /><br />This feature is something more developers should be working to add to their applications. Luck for them Peter Foot and the OpenNetCF team have added this to their <a href="http://www.opennetcf.org/library/">library</a> of cool code. 8)
Don Sorcinelli
10-04-2004, 04:21 PM
One word - Sweet!
As always, the OpenNetCF folks get bunches o' kudos for their awesome work.
DonS
Kris Kumar
10-04-2004, 05:26 PM
Does someone know how to do it on eVC++ Smartphone 2002?
I must admit, I haven't looked around. But this feature might help my app.
kennyg
10-04-2004, 06:12 PM
Does someone know how to do it on eVC++ Smartphone 2002?
I must admit, I haven't looked around. But this feature might help my app.
look in winuserm.h for lots of goodies like this:
Edit_SetInputMode(hWndEdit, IM_NUMBERS);
Just call this method after the control is created and as soon as the user enters the control it will automatically change the input type.
And for real developer content goto http://www.smartphonedn.com, All this stuff is there for you enjoyment...
There is also an article on doing custom IME stuff for your own controls so you can internationalize searches like in contacts.
Kenny.
Mike Temporale
10-04-2004, 06:24 PM
And for real developer content ...
Wait a sec... Are you saying that we don't post real developer news and content? SmartphoneDn offers more developer info, but I wouldn't say that it's any more real than ours. :wink:
kennyg
10-04-2004, 06:26 PM
And for real developer content ...
Wait a sec... Are you saying that we don't post real developer news and content? SmartphoneDn offers more developer info, but I wouldn't say that it's any more real than ours. :wink:
Ok, I'll give you that, you've got them WAY beat on NEWS content, they have much more say, IN-DEPTH CODE knowledge? :oops:
Kenny.
Mike Temporale
10-04-2004, 06:33 PM
They are really heavy into C. I've tried searching around their site in the past, for eVB or even VB.Net code and there is next to nothing there. :(
Kris Kumar
10-04-2004, 06:34 PM
Thanks kennyg
I must admit that I do visit Smartphone Developer Network when I am looking for In-Depth Developer Material. Sorry Mike! :oops:
:wink:
Kris Kumar
10-04-2004, 06:36 PM
They are really heavy into C. I've tried searching around their site in the past, for eVB or even VB.Net code and there is next to nothing there. :(
I think you are right. I use eVC++ for most of my work. So the site works great.
And a tip. For searching. I use the Google Toolbar to perform the search on the site. I am able to pull up more stuff using the toolbar than the site's own navigation system. ;-)
Kris Kumar
10-04-2004, 06:41 PM
Mike, forgot to mention, John Cody's site is where the eVB guys hang out. But I believe you may already know about it.
http://omnisoft.com/forums
John Cody
10-04-2004, 07:01 PM
Thanks Kris for the Mention :)
Also, I think I found a bug in the Smartphone 2003 OS in which it appears you can not programmically set the Shift or Capslock state of an Edit control on a 2003 based device.
The below message calls work perfectly on 2002 devices to set the input mode to either all lower-case, first character upper-case, or all characters upper-case:
Res = SendMessage(hText, EM_SETINPUTMODE, 0, EIM_Spell)
Res = SendMessage(hText, EM_SETINPUTMODE, 0, EIM_Spell Or IMMF_SETCLR_SHIFT Or IMMF_SHIFT)
Res = SendMessage(hText, EM_SETINPUTMODE, 0, EIM_Spell Or IMMF_CAPSLOCK Or IMMF_SETCLR_CAPSLOCK)
And, all three variations of the T9 modes also work on 2002 devices. But, the first-upper and all-upper do not work on 2003 devices, only the all-lower case works.
I posted this "bug" in the Smartphone Newsgroup on 8/1, and another developer "Ali Gardezi" verified that he too could not get it to work on a real 2003 device (although it appears it works in the 2003 emulator).
I hope Microsoft realizes and fixes this issue :D
Mike Temporale
10-04-2004, 08:17 PM
Mike, forgot to mention, John Cody's site is where the eVB guys hang out. But I believe you may already know about it.
http://omnisoft.com/forums
Yup. :wink: There is also a forum on http://www.Ruttensoft.com for eVB. However, I haven't looked in a little while, as I'm more focused on .Net than the eVB/C world right now. :D
Kris Kumar
10-04-2004, 08:25 PM
although it appears it works in the 2003 emulator
The famous "emulator". I must mention that I have lost count of the number of times I have been misguided by the emulator. My app would work fine on the emulator. I would complete all the code. Only to find that it will not work at all on the real device. Then have to spend hours to debug the code on the real device, only to find additional code is needed or that is a bug in the emulator or the real device (as in your case). :-(
Mike Temporale
10-04-2004, 08:27 PM
The famous "emulator". I must mention that I have lost count of the number of times I have been misguided by the emulator. ...
Oh! So it's not just me and my poor coding pratices. :lol:
Don Sorcinelli
10-04-2004, 08:33 PM
The famous "emulator". I must mention that I have lost count of the number of times I have been misguided by the emulator. ...
Oh! So it's not just me and my poor coding pratices. :lol:
:rotfl:
Personally, I have attributed it to when I code and what I'm doing - :drinking:
DonS
Peter Foot
10-05-2004, 09:43 PM
Also, I think I found a bug in the Smartphone 2003 OS in which it appears you can not programmically set the Shift or Capslock state of an Edit control on a 2003 based device.
The below message calls work perfectly on 2002 devices to set the input mode to either all lower-case, first character upper-case, or all characters upper-case:
Res = SendMessage(hText, EM_SETINPUTMODE, 0, EIM_Spell)
Res = SendMessage(hText, EM_SETINPUTMODE, 0, EIM_Spell Or IMMF_SETCLR_SHIFT Or IMMF_SHIFT)
Res = SendMessage(hText, EM_SETINPUTMODE, 0, EIM_Spell Or IMMF_CAPSLOCK Or IMMF_SETCLR_CAPSLOCK)
And, all three variations of the T9 modes also work on 2002 devices. But, the first-upper and all-upper do not work on 2003 devices, only the all-lower case works.
I posted this "bug" in the Smartphone Newsgroup on 8/1, and another developer "Ali Gardezi" verified that he too could not get it to work on a real 2003 device (although it appears it works in the 2003 emulator).
I hope Microsoft realizes and fixes this issue :D
I just checked on both a 2003 device (SPV E200) and 2003 Second Edition device (SPV C500) and both set the shift/caps lock as expected. Perhaps if it was a bug it was fixed in a ROM update?
Peter
vBulletin® v3.8.9, Copyright ©2000-2019, vBulletin Solutions, Inc.