Edit Control...Edit Control...Edit Control...Edit Control...Edit Control... 
Author Message
 Edit Control...Edit Control...Edit Control...Edit Control...Edit Control...

Hello:

I have a very specific question regarding regular edit controls (not rich text
edit):

I have programmed my controls so that when the user reaches the end of a
control, the caret will automatically jump to the next control.  HOWEVER, the
problem that I have is that the caret always jumps to the LAST position the
caret occupied  in the control that follows.  In other words, I always want to
have the caret jump to the FIRST (0,0) position of the next control (not the
last position occupied by the caret the last time the caret was in the control
that follows).

I tried SetCaretPos()  and that does get the cursor to the FIRST (0,0)
position, but the problem is that the minute any key is pressed in the control,
the caret jumps to the last position occupied.

Please help.  Thank you.

Martin



Fri, 06 Oct 2000 03:00:00 GMT  
 Edit Control...Edit Control...Edit Control...Edit Control...Edit Control...

Quote:
>I have programmed my controls so that when the user reaches the end of a
>control, the caret will automatically jump to the next control.  HOWEVER, the
>problem that I have is that the caret always jumps to the LAST position the
>caret occupied  in the control that follows.  In other words, I always want to
>have the caret jump to the FIRST (0,0) position of the next control (not the
>last position occupied by the caret the last time the caret was in the control
>that follows).

Martin,

You need to set the selection to position the caret properly. Have a
look at EM_SETSEL (CEdit::SetSel).

Dave
----
Address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow up email copies.



Sat, 07 Oct 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Edit Control---- Edit control ----------------------

2. Using Rich Edit Control or ip address control in a composite control

3. CListCtrl edit control -- how to end editing

4. problems while programming an edit(not use edit control)

5. WTL edit controls in COM controls and beeps

6. Composite Control using rich edit control question

7. Masked Edit Control and Remote data control problem

8. Bell sound when ENTER is pressed in an EDIT control child of an ATL control

9. Rich edit control on Control dialog bar

10. Controlling Scrolling in Rich Edit Control

11. Edit Control for floating point numbers w/ spinner control

12. Placing a control in an edit control's NC area

 

 
Powered by phpBB® Forum Software