WM_UNICHAR for handling Unicode

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

WM_UNICHAR for handling Unicode

Chris Petsos
 
I don't think we will be able to use WM_UNICHAR (at least that easy)...
 
> WM_UNICHAR documentation is wrong.  This message is not generated by the OS, but by other applications ( such as Office).  
 
as stated in
 
 
There are some apps that say they have WM_UNICHAR support but i couldn't sort it out...
And the MSDN documentation is crap...
 
So, i guess we'll stick with Unicode-registered application window (at least for now) ...
 
Christos
Reply | Threaded
Open this post in threaded view
|

Re: WM_UNICHAR for handling Unicode

Bert Freudenberg
 

On May 25, 2007, at 12:20 , Chris Petsos wrote:

> I don't think we will be able to use WM_UNICHAR (at least that  
> easy)...
>
> > WM_UNICHAR documentation is wrong.  This message is not generated  
> by the OS, but by other applications ( such as Office).
>
> as stated in
>
> http://groups.google.com/group/microsoft.public.platformsdk.ui/ 
> browse_thread/thread/24da6f4342831435/7e850958e41306ce?
> lnk=st&q=WM_UNICHAR+message&rnum=1&hl=en#7e850958e41306ce
>
> There are some apps that say they have WM_UNICHAR support but i  
> couldn't sort it out...
> And the MSDN documentation is crap...

Well, the doc says it is generated by TranslateMessage(). Did you  
call that? Also it is not supported by Windows Me and below.

- Bert -


Reply | Threaded
Open this post in threaded view
|

Re: WM_UNICHAR for handling Unicode

Chris Petsos
 
> Well, the doc says it is generated by TranslateMessage(). Did you  call
> that? Also it is not supported by Windows Me and below.

Yeap...no can do...
TranslateMessage() posts another identical message... No WM_UNICHAR message
there...

Christos.

Reply | Threaded
Open this post in threaded view
|

Re: WM_UNICHAR for handling Unicode

Bert Freudenberg
 

On May 25, 2007, at 15:26 , Chris Petsos wrote:

>> Well, the doc says it is generated by TranslateMessage(). Did you  
>> call that? Also it is not supported by Windows Me and below.
>
> Yeap...no can do...
> TranslateMessage() posts another identical message... No WM_UNICHAR  
> message there...

" The WM_UNICHAR message is first sent to a window, with  
UNICODE_NOCHAR (0xFFFF) in order to determine if the window supports  
it. If not handled, DefWindowProc will return 0 (on all versions of  
Windows), indicating that WM_UNICHAR is not supported. You must  
return 1 from your window procedure in order to receive input via  
WM_UNICHAR. "
(http://www.tavultesoft.com/keyman/documentation/unicodeinput.php)

Did you return 1?

- Bert -


Reply | Threaded
Open this post in threaded view
|

Re: WM_UNICHAR for handling Unicode

Chris Petsos
 
> " The WM_UNICHAR message is first sent to a window, with  UNICODE_NOCHAR
> (0xFFFF) in order to determine if the window supports  it. If not handled,
> DefWindowProc will return 0 (on all versions of  Windows), indicating that
> WM_UNICHAR is not supported. You must  return 1 from your window procedure
> in order to receive input via  WM_UNICHAR. "
> (http://www.tavultesoft.com/keyman/documentation/unicodeinput.php)
>
> Did you return 1?

Sorry if i make silly questions Bert but... what does he mean by
> You must  return 1 from your window procedure

Which exactly is the window procedure (the DefWindowProc?) ?
How can i handle it to return 1?
Should i check the message wParam in recordKeyboardEvent(MSG *msg) and if it
is UNICODE_NOCHAR (0xFFFF) then i should make it (recordKeyboardEvent)
return 1 only for that time? And after that i should get WM_UNICHAR
messages?

Christos.

Reply | Threaded
Open this post in threaded view
|

Re: WM_UNICHAR for handling Unicode

Bert Freudenberg
 

On May 25, 2007, at 21:46 , Chris Petsos wrote:

>> " The WM_UNICHAR message is first sent to a window, with  
>> UNICODE_NOCHAR (0xFFFF) in order to determine if the window  
>> supports  it. If not handled, DefWindowProc will return 0 (on all  
>> versions of  Windows), indicating that WM_UNICHAR is not  
>> supported. You must  return 1 from your window procedure in order  
>> to receive input via  WM_UNICHAR. "
>> (http://www.tavultesoft.com/keyman/documentation/unicodeinput.php)
>>
>> Did you return 1?
>
> Sorry if i make silly questions Bert but... what does he mean by
>> You must  return 1 from your window procedure
>
> Which exactly is the window procedure (the DefWindowProc?) ?
> How can i handle it to return 1?
> Should i check the message wParam in recordKeyboardEvent(MSG *msg)  
> and if it is UNICODE_NOCHAR (0xFFFF) then i should make it  
> (recordKeyboardEvent) return 1 only for that time? And after that i  
> should get WM_UNICHAR messages?


I just find it hard to believe that WM_UNICHAR would not work when  
all over the place people recommend it as the way to input unicode  
characters in Windows. You should work with someone who knows his way  
around Windows programming (which is not me, I managed to avoid  
having to deal with MS software for years).

- Bert -


Reply | Threaded
Open this post in threaded view
|

Re: WM_UNICHAR for handling Unicode

Chris Petsos
 
> I managed to avoid  
> having to deal with MS software for years

I think i know what you mean!
Thanks for everything!

Christos.