Click here to Skip to main content
15,893,644 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Determine the CRichEditCtrl which holds the focus Pin
SutterA11-Sep-08 2:09
SutterA11-Sep-08 2:09 
GeneralRe: Determine the CRichEditCtrl which holds the focus [modified] Pin
SandipG 11-Sep-08 2:44
SandipG 11-Sep-08 2:44 
GeneralRe: Determine the CRichEditCtrl which holds the focus Pin
SutterA11-Sep-08 3:06
SutterA11-Sep-08 3:06 
GeneralRe: Determine the CRichEditCtrl which holds the focus Pin
SandipG 11-Sep-08 3:10
SandipG 11-Sep-08 3:10 
GeneralRe: Determine the CRichEditCtrl which holds the focus Pin
SutterA11-Sep-08 3:24
SutterA11-Sep-08 3:24 
GeneralRe: Determine the CRichEditCtrl which holds the focus Pin
David Crow11-Sep-08 3:20
David Crow11-Sep-08 3:20 
GeneralRe: Determine the CRichEditCtrl which holds the focus Pin
SutterA11-Sep-08 3:26
SutterA11-Sep-08 3:26 
GeneralRe: Determine the CRichEditCtrl which holds the focus Pin
David Crow11-Sep-08 3:40
David Crow11-Sep-08 3:40 
Member 3554668 wrote:
...as I click on the button...


Why you are just now getting around to mentioning this?

Given this new bit of information, you'll need to keep track of the edit control that had focus last, which is something that WM_SETFOCUS tells you. If you don't like that approach, then each time an edit control gains focus, assign its id, window handle, or CWnd object to some variable that can be compared against later.

I suspect there is a more elegant way of doing this, but with the lack of information provided, I can't say for sure.

"Love people and use things, not love things and use people." - Unknown

"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch


GeneralRe: Determine the CRichEditCtrl which holds the focus Pin
SutterA11-Sep-08 3:45
SutterA11-Sep-08 3:45 
GeneralRe: Determine the CRichEditCtrl which holds the focus Pin
David Crow11-Sep-08 3:51
David Crow11-Sep-08 3:51 
GeneralRe: Determine the CRichEditCtrl which holds the focus Pin
enhzflep11-Sep-08 4:19
enhzflep11-Sep-08 4:19 
AnswerRe: Determine the CRichEditCtrl which holds the focus Pin
enhzflep11-Sep-08 5:01
enhzflep11-Sep-08 5:01 
GeneralRe: Determine the CRichEditCtrl which holds the focus Pin
SutterA11-Sep-08 5:45
SutterA11-Sep-08 5:45 
GeneralRe: Determine the CRichEditCtrl which holds the focus Pin
enhzflep11-Sep-08 5:53
enhzflep11-Sep-08 5:53 
GeneralRe: Determine the CRichEditCtrl which holds the focus Pin
SutterA11-Sep-08 21:54
SutterA11-Sep-08 21:54 
Questioncompiler in VC++6.0 Pin
aa_zz11-Sep-08 0:57
aa_zz11-Sep-08 0:57 
AnswerRe: compiler in VC++6.0 Pin
Rane11-Sep-08 1:01
Rane11-Sep-08 1:01 
AnswerRe: compiler in VC++6.0 Pin
_AnsHUMAN_ 11-Sep-08 1:12
_AnsHUMAN_ 11-Sep-08 1:12 
AnswerRe: compiler in VC++6.0 Pin
Hamid_RT11-Sep-08 1:25
Hamid_RT11-Sep-08 1:25 
AnswerRe: compiler in VC++6.0 Pin
CPallini11-Sep-08 1:35
mveCPallini11-Sep-08 1:35 
QuestionSetting full access permissions to a directory using CreateDirectory( ) Pin
V K 211-Sep-08 0:45
V K 211-Sep-08 0:45 
AnswerRe: Setting full access permissions to a directory using CreateDirectory( ) Pin
Rane11-Sep-08 0:58
Rane11-Sep-08 0:58 
AnswerRe: Setting full access permissions to a directory using CreateDirectory( ) Pin
santhoshv8411-Sep-08 1:01
santhoshv8411-Sep-08 1:01 
GeneralRe: Setting full access permissions to a directory using CreateDirectory( ) Pin
Rane11-Sep-08 1:03
Rane11-Sep-08 1:03 
GeneralRe: Setting full access permissions to a directory using CreateDirectory( ) Pin
V K 211-Sep-08 1:47
V K 211-Sep-08 1:47 

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.