Windows Mobile Developer Network Forum

Windows Mobile Developer Network Forum
It is currently Thu Sep 09, 2010 10:56 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Keyboard (Blackjack, Dash) and LISTVIEW control
PostPosted: Tue Apr 24, 2007 7:09 pm 
Offline

Joined: Sat Jun 21, 2003 3:19 am
Posts: 152
Hello All,

I have a listview control and in it I use keyboard input to search using the LVN_KEY... notificaiton. The problem I am having is the keys that come through.

For the keyboard keys that are NOT numeric, I get normal character codes, for the keys that double as numbers I get numbers.

I've tried overriding the IME to set the listview to a certain type so I get letters instead of numbers, but it's not working also tried setting the input mode with the aygshell IME extensions, but that doesn't work either.

Any thoughts? Any successes?

Thanks,
Kenny.


Top
 Profile  
 
 Post subject: Re:
PostPosted: Thu May 17, 2007 9:49 am 
Offline

Joined: Wed May 31, 2006 7:18 am
Posts: 40
Location: India
case VK_PROCESSKEY :
{
UINT VkCode = ImmGetVirtualKey(hWnd);
if (VkCode == VK_PROCESSKEY)
{
HIMC hImc = ImmGetContext(hWnd);
if (hImc)
{
PINPUTCONTEXT pContext = ImmLockIMC(hImc);
if (pContext)
{
VkCode = pContext->uSavedVKey;
if(VK_F1==VkCode ||VK_F2==VkCode)
{
SendMessage(hParent, message, VkCode, lParam);
}
ImmUnlockIMC(hImc);
}
ImmReleaseContext(hWnd, hImc);
}
}
}
break;

If there is IME i s enable you can use above code in listwndproc.
If there is no IME concpet related then while creating the list window
probably some attibutes o f window need to change , if this code has been ported from wince to window mobile.

good luck

Matrixlnmi


Top
 Profile  
 
 Post subject: Re:
PostPosted: Thu Jun 26, 2008 6:54 pm 
Offline

Joined: Thu Jun 26, 2008 6:50 pm
Posts: 1
Hi Matrixlnmi169,

you're a lifesaver! Thank you so much for the code you posted. I was having a really hard time translating the vk_processkey on the moto blackjack 1. Your code set me in the right direction!

Take care and thanks!
Brady

Matrixlnmi169 wrote:
case VK_PROCESSKEY :
{
UINT VkCode = ImmGetVirtualKey(hWnd);
if (VkCode == VK_PROCESSKEY)
{
HIMC hImc = ImmGetContext(hWnd);
if (hImc)
{
PINPUTCONTEXT pContext = ImmLockIMC(hImc);
if (pContext)
{
VkCode = pContext->uSavedVKey;
if(VK_F1==VkCode ||VK_F2==VkCode)
{
SendMessage(hParent, message, VkCode, lParam);
}
ImmUnlockIMC(hImc);
}
ImmReleaseContext(hWnd, hImc);
}
}
}
break;

If there is IME i s enable you can use above code in listwndproc.
If there is no IME concpet related then while creating the list window
probably some attibutes o f window need to change , if this code has been ported from wince to window mobile.

good luck

Matrixlnmi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group