Solved

intercept the wm_char message

Posted on 2003-10-22
10
586 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
strCopies  challenge 17 82
Good resource for accessibility implementation 1 61
creating threads in delphi 1 82
"Black Box" Testing of Control System Software 2 22
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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 …

912 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now