Click here to Skip to main content
15,920,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralGraying Out Tabs in a Property Page Pin
laiju3-Jun-05 10:38
laiju3-Jun-05 10:38 
GeneralRe: Graying Out Tabs in a Property Page Pin
David Crow3-Jun-05 11:03
David Crow3-Jun-05 11:03 
GeneralNeed help resolving a deadlock Pin
Budric B.3-Jun-05 10:19
Budric B.3-Jun-05 10:19 
GeneralRe: Just found the problem Pin
Budric B.3-Jun-05 11:02
Budric B.3-Jun-05 11:02 
GeneralRe: Just found the problem Pin
Blake Miller3-Jun-05 11:08
Blake Miller3-Jun-05 11:08 
GeneralA question about CBT hook Pin
Gaetano Sferra3-Jun-05 9:10
Gaetano Sferra3-Jun-05 9:10 
GeneralRe: A question about CBT hook Pin
Nilesh K.5-Jun-05 23:32
Nilesh K.5-Jun-05 23:32 
GeneralRe: A question about CBT hook Pin
Gaetano Sferra6-Jun-05 0:44
Gaetano Sferra6-Jun-05 0:44 
Nilesh K. wrote:
In a call to SetWindowsHookEx(), set the last parameter as '0' This would associate hook with all the existing threads.

Looking into the MSDN, in the SetWindowsHookEx explaination I see the following:

lpfn
[in] Pointer to the hook procedure. If the dwThreadId parameter is zero or specifies the identifier of a thread created by a different process, the lpfn parameter must point to a hook procedure in a dynamic-link library (DLL). Otherwise, lpfn can point to a hook procedure in the code associated with the current process.

If I set the last parameter of the SetWindowsHookEx() (dwThradId) to 0 I cannot provide a pointer to an hook procedure that reside in the my application process as shown in my previous post, I shoud build a DLL.

My questions are:
Can I obtain a handle to the window losing the keyboard focus without use a global hook (a hook procedure in a DLL)?

Why when my application window lose the ketyboard focus the hook procedure isn't called? (It should trap a CBT event with the lParam set to the handle to my application window)

Why when my application window gain the keyboard focus I got NULL as handle to the window losing the keyboard focus? (I should get the correct handle because the CBT event destination is the my application process)

If my interpretation of MSDN or my deductions are wrong, please correct me.
Thanks

Gaetano Sferra
GeneralRe: A question about CBT hook Pin
Nilesh K.6-Jun-05 16:43
Nilesh K.6-Jun-05 16:43 
GeneralRe: A question about CBT hook Pin
Gaetano Sferra6-Jun-05 21:23
Gaetano Sferra6-Jun-05 21:23 
GeneralNeed help converting this inline asm cosf function for use in a gnu compiler Pin
FocusedWolf3-Jun-05 8:36
FocusedWolf3-Jun-05 8:36 
GeneralRe: Need help converting this inline asm cosf function for use in a gnu compiler Pin
Chris Losinger3-Jun-05 8:54
professionalChris Losinger3-Jun-05 8:54 
GeneralRe: Need help converting this inline asm cosf function for use in a gnu compiler Pin
FocusedWolf3-Jun-05 11:08
FocusedWolf3-Jun-05 11:08 
QuestionHow to know whether a device is connected to my USB port or not Pin
anukampa3-Jun-05 4:58
anukampa3-Jun-05 4:58 
AnswerRe: How to know whether a device is connected to my USB port or not Pin
Trollslayer3-Jun-05 13:14
mentorTrollslayer3-Jun-05 13:14 
AnswerRe: How to know whether a device is connected to my USB port or not Pin
FlyingTinman3-Jun-05 14:36
FlyingTinman3-Jun-05 14:36 
GeneralCComboBox selection state before CBN_SELCHANGE Pin
stevy823-Jun-05 4:24
stevy823-Jun-05 4:24 
GeneralRe: CComboBox selection state before CBN_SELCHANGE Pin
David Crow3-Jun-05 5:28
David Crow3-Jun-05 5:28 
GeneralMonitoring opened files Pin
0908869039@seznam.cz3-Jun-05 3:37
0908869039@seznam.cz3-Jun-05 3:37 
GeneralRe: Monitoring opened files Pin
David Crow3-Jun-05 4:03
David Crow3-Jun-05 4:03 
Generalplatform Win32 title bar Pin
camoguard3-Jun-05 2:51
camoguard3-Jun-05 2:51 
GeneralFlickering Pin
Dennis L3-Jun-05 2:29
Dennis L3-Jun-05 2:29 
GeneralRe: Flickering Pin
David Crow3-Jun-05 2:43
David Crow3-Jun-05 2:43 
GeneralRe: Flickering Pin
Dennis L3-Jun-05 2:47
Dennis L3-Jun-05 2:47 
GeneralCPropertySheet, WS_CHILD and hidden dialogs Pin
LucanFahr3-Jun-05 1:45
LucanFahr3-Jun-05 1:45 

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.