Click here to Skip to main content
15,889,429 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalgettin' jiggy with it Pin
closecall10-Nov-03 19:14
closecall10-Nov-03 19:14 
GeneralRe: gettin' jiggy with it Pin
RoyceF1-Dec-06 9:17
RoyceF1-Dec-06 9:17 
Generalto Pin
samhita10-Nov-03 18:39
samhita10-Nov-03 18:39 
GeneralDrag and Drop to WinXp Cd Wiz Takes a Wiz Pin
Swinefeaster10-Nov-03 18:15
Swinefeaster10-Nov-03 18:15 
QuestionAny Experts Like to Challange This Questions??? Pin
percyvimal10-Nov-03 16:50
percyvimal10-Nov-03 16:50 
AnswerRe: Any Experts Like to Challange This Questions??? Pin
Dave Bryant10-Nov-03 17:08
Dave Bryant10-Nov-03 17:08 
GeneralRe: Any Experts Like to Challange This Questions??? Pin
percyvimal10-Nov-03 17:15
percyvimal10-Nov-03 17:15 
GeneralRe: Any Experts Like to Challange This Questions??? Pin
Dave Bryant10-Nov-03 17:24
Dave Bryant10-Nov-03 17:24 
The first three lines of the function, handle the case where the code is less than zero. According to MSDN for the get message hook, in that case we must immediately call CallNextHookEx() without doing anything else.

Then we retrieve the MSG structure (which defines a windows message). It is stored in the lParam passed to our callback function (again details from MSDN - look up SetWindowsHookEx() and follow the link for the get message hook).

Next we check that it is the WM_CHAR message - everything else we are ignoring. Once we have the WM_CHAR message, we know that the character is stored in the wParam of the message (check MSDN for WM_CHAR), and so can retrieve it from there.

If we wanted to modify the character, then we just set the value of pMsg->wParam at this point.

e.g.

...
if ( 'A' == ch ) {
  // Modify the character
  pMsg->wParam = 0x1234; // Some random unicode character
}
...

Dave
http://www.cloudsofheaven.org
GeneralRe: Any Experts Like to Challange This Questions??? Pin
percyvimal10-Nov-03 17:29
percyvimal10-Nov-03 17:29 
GeneralRe: Any Experts Like to Challange This Questions??? Pin
Antti Keskinen11-Nov-03 10:50
Antti Keskinen11-Nov-03 10:50 
GeneralIsWindow(m_hwnd) returns 0. Pin
suninwater10-Nov-03 16:48
suninwater10-Nov-03 16:48 
GeneralRe: IsWindow(m_hwnd) returns 0. Pin
Dave Bryant10-Nov-03 17:14
Dave Bryant10-Nov-03 17:14 
GeneralRe: IsWindow(m_hwnd) returns 0. Pin
suninwater10-Nov-03 19:24
suninwater10-Nov-03 19:24 
GeneralRe: IsWindow(m_hwnd) returns 0. Pin
Dave Bryant11-Nov-03 8:26
Dave Bryant11-Nov-03 8:26 
GeneralRe: IsWindow(m_hwnd) returns 0. Pin
MultiThread10-Nov-03 17:27
MultiThread10-Nov-03 17:27 
GeneralRe: IsWindow(m_hwnd) returns 0. Pin
Swinefeaster10-Nov-03 18:19
Swinefeaster10-Nov-03 18:19 
GeneralCDialogBar Background color Pin
asierra10-Nov-03 16:21
asierra10-Nov-03 16:21 
GeneralDesign opinions/help needed Pin
Steve Messer10-Nov-03 16:06
Steve Messer10-Nov-03 16:06 
GeneralRe: Design opinions/help needed Pin
Antti Keskinen11-Nov-03 11:21
Antti Keskinen11-Nov-03 11:21 
GeneralRe: Design opinions/help needed Pin
Steve Messer11-Nov-03 18:05
Steve Messer11-Nov-03 18:05 
GeneralRe: Design opinions/help needed Pin
Antti Keskinen12-Nov-03 8:25
Antti Keskinen12-Nov-03 8:25 
GeneralRe: Design opinions/help needed Pin
Steve Messer12-Nov-03 12:07
Steve Messer12-Nov-03 12:07 
GeneralRe: Design opinions/help needed Pin
Antti Keskinen13-Nov-03 0:44
Antti Keskinen13-Nov-03 0:44 
GeneralRe: Design opinions/help needed Pin
Steve Messer13-Nov-03 1:35
Steve Messer13-Nov-03 1:35 
GeneralRe: Design opinions/help needed Pin
Antti Keskinen13-Nov-03 5:17
Antti Keskinen13-Nov-03 5:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.