Click here to Skip to main content
15,913,487 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralGetting input in an array... Pin
Aqseel A. Mirza23-Apr-05 7:12
sussAqseel A. Mirza23-Apr-05 7:12 
GeneralRe: Getting input in an array... Pin
Ravi Bhavnani23-Apr-05 7:43
professionalRavi Bhavnani23-Apr-05 7:43 
GeneralRe: Getting input in an array... Pin
Member 190113623-Apr-05 15:24
Member 190113623-Apr-05 15:24 
Generalcin.get is creating problem Pin
Aqueel25-Apr-05 1:55
Aqueel25-Apr-05 1:55 
GeneralRe: cin.get is creating problem Pin
Member 190113625-Apr-05 2:06
Member 190113625-Apr-05 2:06 
GeneralThanks Pin
Aqueel25-Apr-05 3:50
Aqueel25-Apr-05 3:50 
GeneralWM_KILLFOCUS Pin
PeteMan_R23-Apr-05 6:55
PeteMan_R23-Apr-05 6:55 
GeneralRe: WM_KILLFOCUS Pin
Peter Ritchie23-Apr-05 8:36
Peter Ritchie23-Apr-05 8:36 
You can't "abort" the focus change. But, you can switch back the the control losing focus.

In you case you could handle the WM_KILLFOCUS, keep track of the new focus window, put focus back to the current window, call a method/fuction (or fire and event) to test if the focus can be lost. If the focus can't be lost, do nothing (or inform the user why), if it can be lost, switch focus to the new window.

There's different ways of doing that; but, that's one way.

If you're using MFC you might what to check out DDX (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_defining_member_variables_for_ddx.asp[^])


PeterRitchie.com
GeneralRe: WM_KILLFOCUS Pin
PJ Arends23-Apr-05 14:55
professionalPJ Arends23-Apr-05 14:55 
GeneralRe: WM_KILLFOCUS Pin
PeteMan_R23-Apr-05 15:18
PeteMan_R23-Apr-05 15:18 
GeneralRe: WM_KILLFOCUS Pin
Ravi Bhavnani23-Apr-05 18:24
professionalRavi Bhavnani23-Apr-05 18:24 
GeneralRe: WM_KILLFOCUS Pin
Anonymous25-Apr-05 18:07
Anonymous25-Apr-05 18:07 
GeneralPlease help me! Pin
dSolariuM23-Apr-05 4:27
dSolariuM23-Apr-05 4:27 
GeneralRe: Please help me! Pin
Ravi Bhavnani23-Apr-05 7:46
professionalRavi Bhavnani23-Apr-05 7:46 
GeneralRe: Please help me! Pin
dSolariuM24-Apr-05 5:01
dSolariuM24-Apr-05 5:01 
GeneralRe: Please help me! Pin
Ravi Bhavnani24-Apr-05 5:51
professionalRavi Bhavnani24-Apr-05 5:51 
Generaltext over image Pin
Lampros Giampouras23-Apr-05 4:06
Lampros Giampouras23-Apr-05 4:06 
Generalvirtual static Pin
Konrad Windszus23-Apr-05 3:38
Konrad Windszus23-Apr-05 3:38 
GeneralRe: virtual static Pin
Maximilien23-Apr-05 4:19
Maximilien23-Apr-05 4:19 
Generali want help in game programing Pin
medlteam23-Apr-05 3:37
medlteam23-Apr-05 3:37 
GeneralRe: i want help in game programing Pin
namaskaaram23-Apr-05 4:26
namaskaaram23-Apr-05 4:26 
Generaldisable Message Reflection of OLE Controls Pin
Anonymous23-Apr-05 2:59
Anonymous23-Apr-05 2:59 
Generalborland c++ bulider book Pin
aloktambi23-Apr-05 0:44
aloktambi23-Apr-05 0:44 
GeneralShow an Editbox Pin
fan wei fang23-Apr-05 0:09
fan wei fang23-Apr-05 0:09 
GeneralRe: Show an Editbox Pin
ThatsAlok23-Apr-05 3:03
ThatsAlok23-Apr-05 3:03 

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.