Uppercase TextBox

H

Hilton

Hi,

GetWindowLong and SetWindowLong work great on the Pocket PC, but not on the
Smartphone (characters are not forced to upper case)

Any idea why the GetWindowLong/SetWindowLong example below is not working?
Any alternatives?

Thanks,

Hilton
------------
public ATextBox (EditStyle es)
{
// Get the handle
this.Capture = true;
IntPtr hWnd = GetCapture();
this.Capture = false;

int lStyle = ATextBox.GetWindowLong (hWnd,
GetWindowLongParam.GWL_STYLE);

lStyle |= (int) es;

ATextBox.SetWindowLong (hWnd, GetWindowLongParam.GWL_STYLE,
lStyle);
}

public enum GetWindowLongParam
{
GWL_WNDPROC = (-4),
GWL_HINSTANCE = (-6),
GWL_HWNDPARENT = (-8),
GWL_STYLE = (-16),
GWL_EXSTYLE = (-20),
GWL_USERDATA = (-21),
GWL_ID = (-12)
}

public enum EditStyle
{
ES_LEFT = 0x0000,
ES_CENTER = 0x0001,
ES_RIGHT = 0x0002,
ES_MULTILINE = 0x0004,
ES_UPPERCASE = 0x0008,
ES_LOWERCASE = 0x0010,
ES_PASSWORD = 0x0020,
ES_AUTOVSCROLL = 0x0040,
ES_AUTOHSCROLL = 0x0080,
ES_NOHIDESEL = 0x0100,
ES_COMBOBOX = 0x0200,
ES_OEMCONVERT = 0x0400,
ES_READONLY = 0x0800,
ES_WANTRETURN = 0x1000,
ES_NUMBER = 0x2000
}
 
M

Michael J. Salamone

I don't know the answer you're looking for, but I do know that the
Smartphone editbox has different input modes. Check Get/Set_InputMode in
your WinMo SDK. Looks like you may want Edit_SetInputMode(EIMMF_CAPSLOCK).
 
Top