|
From: folderann on 4 May 2008 17:46 I new to this so bear with me. Running VC++ in Visual Studio 2003 . I'd like to trap the character in the CSstring in an Edit control that triggers an EN_MAXTEXT message and move it to the next edit control in the tab order to begin that CString. It's easy to move the focus with a SetFocus() message but I can't grab the "offending" character. Thanks in advance.
From: Joseph M. Newcomer on 5 May 2008 02:24 Probably because the EN_MAXTEXT is probably not the write trigger. I've done this, and essentially, I did it on EN_CHANGE notifications; if the length was at the limit, I would set the focus to the next control after receiving the EN_CHANGE. joe On Sun, 04 May 2008 17:46:50 -0400, folderann <tantanna(a)tat.com> wrote: >I new to this so bear with me. Running VC++ in Visual Studio 2003 . > > I'd like to trap the character in the CSstring in an Edit control >that triggers an EN_MAXTEXT message and move it to the next edit >control in the tab order to begin that CString. > >It's easy to move the focus with a SetFocus() message but I can't grab >the "offending" character. > >Thanks in advance. Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: folderann on 5 May 2008 07:39 Thanks!! Will that display the character in the next window without the user having to re-type it? On Mon, 05 May 2008 02:24:02 -0400, Joseph M. Newcomer <newcomer(a)flounder.com> wrote: >Probably because the EN_MAXTEXT is probably not the write trigger. I've done this, and >essentially, I did it on EN_CHANGE notifications; if the length was at the limit, I would >set the focus to the next control after receiving the EN_CHANGE. > joe > >On Sun, 04 May 2008 17:46:50 -0400, folderann <tantanna(a)tat.com> wrote: > >>I new to this so bear with me. Running VC++ in Visual Studio 2003 . >> >> I'd like to trap the character in the CSstring in an Edit control >>that triggers an EN_MAXTEXT message and move it to the next edit >>control in the tab order to begin that CString. >> >>It's easy to move the focus with a SetFocus() message but I can't grab >>the "offending" character. >> >>Thanks in advance. >Joseph M. Newcomer [MVP] >email: newcomer(a)flounder.com >Web: http://www.flounder.com >MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Joseph M. Newcomer on 5 May 2008 10:16 Yes, because it moves to the next edit control when it discovers the current edit control is now filled, rather than using EN_MAXTEXT, which tells you that you can't put the current character in it. joe On Mon, 05 May 2008 07:39:42 -0400, folderann <tantanna(a)tat.com> wrote: >Thanks!! Will that display the character in the next window without >the user having to re-type it? > >On Mon, 05 May 2008 02:24:02 -0400, Joseph M. Newcomer ><newcomer(a)flounder.com> wrote: > >>Probably because the EN_MAXTEXT is probably not the write trigger. I've done this, and >>essentially, I did it on EN_CHANGE notifications; if the length was at the limit, I would >>set the focus to the next control after receiving the EN_CHANGE. >> joe >> >>On Sun, 04 May 2008 17:46:50 -0400, folderann <tantanna(a)tat.com> wrote: >> >>>I new to this so bear with me. Running VC++ in Visual Studio 2003 . >>> >>> I'd like to trap the character in the CSstring in an Edit control >>>that triggers an EN_MAXTEXT message and move it to the next edit >>>control in the tab order to begin that CString. >>> >>>It's easy to move the focus with a SetFocus() message but I can't grab >>>the "offending" character. >>> >>>Thanks in advance. >>Joseph M. Newcomer [MVP] >>email: newcomer(a)flounder.com >>Web: http://www.flounder.com >>MVP Tips: http://www.flounder.com/mvp_tips.htm Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: David Ching on 5 May 2008 10:37 "Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in message news:4k5u14hp9sfd8kohdi6rreg8h6uhijj7l7(a)4ax.com... >>Thanks!! Will that display the character in the next window without >>the user having to re-type it? >> > Yes, because it moves to the next edit control when it discovers the > current edit control > is now filled, rather than using EN_MAXTEXT, which tells you that you > can't put the > current character in it. > joe > How does that work? EN_CHANGE just tells you when the edit box is (or is about to be) changed. It doesn't move the focus to the next dialog control, nor type the character into it. I would think the dialog handler would need to do that. -- David
|
Next
|
Last
Pages: 1 2 3 Prev: How to: optional CString parameter Next: screen show and print : difference |