Click here to Skip to main content
15,887,474 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Syntax colouring Pin
Shog930-Dec-01 8:46
sitebuilderShog930-Dec-01 8:46 
GeneralRe: Syntax colouring Pin
Jon Newman30-Dec-01 8:53
Jon Newman30-Dec-01 8:53 
GeneralRe: Syntax colouring Pin
Chris Losinger30-Dec-01 8:57
professionalChris Losinger30-Dec-01 8:57 
GeneralRe: Syntax colouring Pin
Jon Newman30-Dec-01 9:04
Jon Newman30-Dec-01 9:04 
GeneralRe: Syntax colouring Pin
Chris Losinger30-Dec-01 9:09
professionalChris Losinger30-Dec-01 9:09 
QuestionSet Cursor EOL in CEdit box? Pin
Robert Palma Jr.30-Dec-01 8:02
Robert Palma Jr.30-Dec-01 8:02 
AnswerRe: Set Cursor EOL in CEdit box? Pin
567890123430-Dec-01 21:27
567890123430-Dec-01 21:27 
GeneralRe: Set Cursor EOL in CEdit box? Pin
Robert Palma Jr.31-Dec-01 11:13
Robert Palma Jr.31-Dec-01 11:13 
Thanks Alex,

I've got that working (thank-you!), but there still seems to be a "trick" I am missing.

If I write a simple test program that writes to and reads from an edit control, everything seems to work fine.

My "control CEdit" variable is: mc_editkey

=== for example, the following works fine:

mc_editkey.SetWindowText("some stuff");
int len = strlen("some stuff");
mc_editkey.SetSel(len,len,FALSE); //need to put cursor at end
mc_editkey.SetFocus();
UpdateData(FALSE);

===this seems to work fine also;
UpdateData(TRUE);
mc_editkey.GetWindowText(buf, bufmx);

But at other times, the SetWindowText() function does not seem to work and also any attempt to force the cursor to the end of the line also does not work.

Are there any tricks to getting the control to "pay attantion to me"?
Is it possible to issue UpdateData(FALSE) at the wrong time or too many times?

I think there is something(s) fundamental I am missing. For example when the Diaolog Box pops up I want the focus to be in the edit box, i.e. I want the cursor to be there. So in the OnInit function I issue:

mc_editkey.SetFocus();
UpdateData(FALSE);

But it never works.

Much thanks in advance,
Robert
Smile | :)
GeneralRe: Set Cursor EOL in CEdit box? Pin
567890123431-Dec-01 19:50
567890123431-Dec-01 19:50 
GeneralRe: Set Cursor EOL in CEdit box? Pin
Robert Palma Jr.2-Jan-02 8:31
Robert Palma Jr.2-Jan-02 8:31 
GeneralRe: Set Cursor EOL in CEdit box? Pin
56789012342-Jan-02 19:29
56789012342-Jan-02 19:29 
GeneralRe: Set Cursor EOL in CEdit box? Pin
Robert Palma Jr.4-Jan-02 11:34
Robert Palma Jr.4-Jan-02 11:34 
GeneralRe: Set Cursor EOL in CEdit box? Pin
Fredrik Skog1-Jan-02 22:15
Fredrik Skog1-Jan-02 22:15 
GeneralRe: Set Cursor EOL in CEdit box? Pin
Robert Palma Jr.2-Jan-02 8:34
Robert Palma Jr.2-Jan-02 8:34 
GeneralPC CLOCK Pin
meirav30-Dec-01 7:41
meirav30-Dec-01 7:41 
GeneralRe: PC CLOCK Pin
Matt Newman30-Dec-01 8:20
Matt Newman30-Dec-01 8:20 
GeneralDetecting MDAC Version in Code Pin
John Clump30-Dec-01 6:50
John Clump30-Dec-01 6:50 
GeneralRe: Detecting MDAC Version in Code Pin
Rashid Thadha31-Dec-01 4:44
Rashid Thadha31-Dec-01 4:44 
GeneralZipping Question Pin
Ever123430-Dec-01 6:21
Ever123430-Dec-01 6:21 
GeneralRe: Zipping Question Pin
Joaquín M López Muñoz30-Dec-01 6:51
Joaquín M López Muñoz30-Dec-01 6:51 
GeneralRe: Zipping Question Pin
PJ Arends30-Dec-01 8:38
professionalPJ Arends30-Dec-01 8:38 
GeneralRe: Zipping Question Pin
Ever123430-Dec-01 10:32
Ever123430-Dec-01 10:32 
GeneralCrystal Report question ... Pin
Hadi Rezaee29-Dec-01 23:32
Hadi Rezaee29-Dec-01 23:32 
GeneralRe: Crystal Report question ... Pin
Hadi Rezaee30-Dec-01 9:13
Hadi Rezaee30-Dec-01 9:13 
GeneralWM_CHAR Pin
29-Dec-01 18:24
suss29-Dec-01 18:24 

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.