Disabing Word Completion

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am looking for a way to simply disable word completion for an edit field,
other than switching it off for the complete Pocket PC.

We have a "combo box like" user control that needs to pick up the arrow keys
in the KeyDown event to move up and down a listbox. When the user types more
than 2 characters I get VK_PROCESSKEY, which I assume means that the arrow
keys are going to the word completion control.

I have subclassed the edit control to get the VK_RETURN, is my only option
to also use this and see if I get VK_KEYDOWN, etc, there.

Something along the lines of

TextBox.WordCompletion = false

would be nice.

Thanks for any help,

Peter
 
Hi,

It is not so simple as you want...
But try this :

[DllImport("coredll.dll")]
private static extern bool SipGetInfo(SIPINFO sipInfo);
[DllImport("coredll.dll")]
private static extern bool SipSetInfo(SIPINFO sipInfo);

public struct RECT
{
public Int32 left;
public Int32 top;
public Int32 right;
public Int32 bottom;
}


public class SIPINFO
{
private Int32 cbSize;
private Int32 fdwFlags;
private RECT rcVisibleDesktop;
public RECT rcSipRect;
private Int32 dwImDataSize;
private Int32 pvImData;

public void New()
{
//cbSize=Marshal.SizeOf(GetType(SIPINFO));
cbSize=Marshal.SizeOf(this.GetType());
}
}

info.fdwFlags |= SIPF_DISABLECOMPLETION;
SIPF_DISABLECOMPLETION = &H8 '<<== Ref: aygshell.h

BR


Fabien Decret
Windows Embedded Consultant
C# MCP

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/




Peter a écrit :
 
Thanks to both of you, this is exactly what I needed.

One thing I noticed in the second sample:

The following code is used to get the hwnd of the text box:

textBox.Capture = true;
IntPtr m_hWnd = GetCapture();
textBox.Capture = false;

Is there any difference here to calling:

IntPtr m_hWnd = textbox.Handle;

I am currently using Handle flag for the hwnd whenever I need this. Are
there any issues that might arise?

Thanks,

Peter
 
The Handle property was introduced in CF2. Previously you'd have to use the
GetCapture() method to get the handle.

/ Peter
 
Back
Top