Solved

intercept the wm_char message

Posted on 2003-10-22
10
583 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
dividesSelf challange 15 82
Enhanced For loop vs ForEach Loop 4 58
Windows 7 - Fuzzy Fonts 11 52
Path to Python 9 48
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

746 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

12 Experts available now in Live!

Get 1:1 Help Now