Click here to Skip to main content
15,926,375 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WM_KILLFOCUS problem Pin
danginkgo24-Jun-08 0:34
danginkgo24-Jun-08 0:34 
GeneralRe: WM_KILLFOCUS problem Pin
SandipG 24-Jun-08 0:43
SandipG 24-Jun-08 0:43 
GeneralRe: WM_KILLFOCUS problem Pin
danginkgo24-Jun-08 0:50
danginkgo24-Jun-08 0:50 
GeneralRe: WM_KILLFOCUS problem Pin
SandipG 24-Jun-08 0:57
SandipG 24-Jun-08 0:57 
GeneralRe: WM_KILLFOCUS problem Pin
danginkgo24-Jun-08 0:59
danginkgo24-Jun-08 0:59 
GeneralRe: WM_KILLFOCUS problem [modified] Pin
danginkgo24-Jun-08 0:58
danginkgo24-Jun-08 0:58 
GeneralRe: WM_KILLFOCUS problem Pin
danginkgo24-Jun-08 1:35
danginkgo24-Jun-08 1:35 
GeneralRe: WM_KILLFOCUS problem Pin
SandipG 24-Jun-08 2:06
SandipG 24-Jun-08 2:06 
Hi
I tried it in a sample application
1> Main window with two edit controls.
2> In WM_LBUTTONDOWN i called SetFocus(hWnd);

I noticed is that if i dont call setfocus explicitly i dont get the WM_SETFOCUS notification.

and moreover when i switch between the two edit control i dont get any notification.
may be you can try something like following. i dont see any need of using GetWindowLong.
case WM_LBUTTONDOWN:
SetFocus(hWnd);
break;
case WM_KILLFOCUS:
unregisterkeys;
break;
case WM_SETFOCUS:
registerkeys;
break;

I hope it helps.

Regards,
Sandip.

GeneralRe: WM_KILLFOCUS problem Pin
danginkgo24-Jun-08 2:16
danginkgo24-Jun-08 2:16 
GeneralRe: WM_KILLFOCUS problem Pin
SandipG 24-Jun-08 2:34
SandipG 24-Jun-08 2:34 
GeneralRe: WM_KILLFOCUS problem Pin
danginkgo24-Jun-08 2:34
danginkgo24-Jun-08 2:34 
GeneralRe: WM_KILLFOCUS problem Pin
SandipG 24-Jun-08 2:35
SandipG 24-Jun-08 2:35 
AnswerRe: WM_KILLFOCUS problem Pin
KarstenK23-Jun-08 21:50
mveKarstenK23-Jun-08 21:50 
AnswerRe: WM_KILLFOCUS problem Pin
David Crow24-Jun-08 3:15
David Crow24-Jun-08 3:15 
GeneralRe: WM_KILLFOCUS problem Pin
danginkgo24-Jun-08 3:30
danginkgo24-Jun-08 3:30 
Questiontext overlay on video data Pin
ashishmax4723-Jun-08 20:55
ashishmax4723-Jun-08 20:55 
Questionenabling applicaion for UAC Pin
subramanyeswari23-Jun-08 20:48
subramanyeswari23-Jun-08 20:48 
AnswerRe: enabling applicaion for UAC Pin
krmed24-Jun-08 2:01
krmed24-Jun-08 2:01 
QuestionGUI thread priority Pin
rp_suman23-Jun-08 20:33
rp_suman23-Jun-08 20:33 
AnswerRe: GUI thread priority Pin
SandipG 23-Jun-08 20:51
SandipG 23-Jun-08 20:51 
AnswerRe: GUI thread priority Pin
Naveen23-Jun-08 20:52
Naveen23-Jun-08 20:52 
GeneralRe: GUI thread priority Pin
rp_suman23-Jun-08 20:55
rp_suman23-Jun-08 20:55 
GeneralRe: GUI thread priority Pin
Rajesh R Subramanian23-Jun-08 21:34
professionalRajesh R Subramanian23-Jun-08 21:34 
JokeRe: GUI thread priority Pin
SandipG 24-Jun-08 0:49
SandipG 24-Jun-08 0:49 
GeneralRe: GUI thread priority Pin
rp_suman24-Jun-08 15:02
rp_suman24-Jun-08 15:02 

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.