Solved

intercept the wm_char message

Posted on 2003-10-22
10
590 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
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
ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

 

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groovy example issue 10 97
White board coding practice 3 88
Help Required 3 96
how i declare an array which contains email address corresponding to names. 2 23
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This is about my first experience with programming Arduino.
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

770 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