Solved

intercept the wm_char message

Posted on 2003-10-22
10
600 Views
Last Modified: 2013-12-03
i have to hook the keyboard and get keydown event and which key is pressed and then
intercept the wm_char message which is generated for that keydown event and change that particular character and translate that to my own character and that character is an extended ascii character.
Sir i have designed a font file and i included lot of new characters in the font file to accomadate more characters which Tamil language have.I can easily manage to access the 52 characeters in A_Z and a-z using normal keyboard ,but i have included 200 characters .I am not using unicode for i am not using opentype font but only true type font.the remaining characters are in other ascii range .Is it possibe to display them by changing the wm_char message.?
if so how is it possible ?
Do anybody know how to hook the message and intercept keyboard messages and change the character system wide.

thanks in advance
0
Comment
Question by:vimalpercy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9597374
which language are you developing in? if ist only for your application then why hooks? just check the keystrokes for that window and alter them
0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9597378
Generally speaking programming hook is installing special function to be called when certain event occured. Hooks are especially usefull for "spying" or changing different sytem event you don't have full access to. For instance Spy program shipped with VC++. it sets up hook for spying all messages for all windows from all processes and threads. It doesn't have access to all these windows but it can hoks and displays all messages sent to these windows. For instance in my application I forced to the problem how to make standard message box top most. Since this window is created insed user system modal the only one way is to setup a hook and modify message box style when hook procedure is called. There are several hooks. To set up window hook use SetWindowHookEx Win32 API function
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 9598124
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:vimalpercy
ID: 9625071
Thank you very much for your reply
Sir i need little detailed answers and how to implement practically with if possible with an example.

1. How to intercept that message which is generated for a keydown event , before it goes to the respective application or any application , from my application.
2.how to obtain wm_char message from that intercepted message.
4.How to prevent that message from going to its defalut application.
3.How to change the wm_char message and load my own exteded ascii wm_char message ?
4 how to send to the active application or to the application that message to be send ?

Sir I want answers in the form of 1,2,3 & 4 for each question and if possible elobrate answers for me to apply that codings in my aplication.

Thanks in advance
0
 

Author Comment

by:vimalpercy
ID: 9728300
Hello Sir
    I have implemented Wm_getmessage hook and got wm_char message
Say Wm_char = A  
Now what i want to do is to Allow this character to go the application but i have to translate the character to Extended ascii character Say €
LRESULT CALLBACK GetMsgProc(int nCode, WPARAM wParam, LPARAM lParam)
{
   if(nCode < 0)
   {      
     CallNextHookEx(hMsghook, nCode, wParam, lParam);
    return 0;
   }
          LPMSG lpMsg = (LPMSG) lParam;

              if(lpMsg->message == WM_CHAR )
                 (((((((

                                 Here i need the codings to
                                 1. Change the Wm_char to extended ascii character
                                 2.i want the codings how to send a character or combined character to the active application.
     
   return CallNextHookEx(hMsghook, nCode, wParam, lParam);
}
0
 

Author Comment

by:vimalpercy
ID: 10318967
I like to delete the question for nobody answered the question.
0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 10319701
PAQ/refund
Bhagyesh Trivedi
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 11023243
PAQed, with points refunded (500)

PashaMod
Community Support Moderator
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question