Click here to Skip to main content
15,897,187 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CListCtrl - header notification ??? Pin
Christian Graus4-Jan-02 11:12
protectorChristian Graus4-Jan-02 11:12 
GeneralRe: CListCtrl - header notification ??? Pin
Fazlul Kabir4-Jan-02 12:45
Fazlul Kabir4-Jan-02 12:45 
GeneralAaaAAaAARRrRRgGgHHH!!!! KERNEL32.DLL ERROR!! Pin
Rickard Andersson2030-Dec-01 12:08
Rickard Andersson2030-Dec-01 12:08 
Generalno focus Pin
Rickard Andersson2030-Dec-01 12:13
Rickard Andersson2030-Dec-01 12:13 
GeneralRe: AaaAAaAARRrRRgGgHHH!!!! KERNEL32.DLL ERROR!! Pin
squizz31-Dec-01 4:37
squizz31-Dec-01 4:37 
GeneralRe: AaaAAaAARRrRRgGgHHH!!!! KERNEL32.DLL ERROR!! Pin
Rickard Andersson2031-Dec-01 5:03
Rickard Andersson2031-Dec-01 5:03 
GeneralOptimizing memory usage Pin
IGx8930-Dec-01 11:53
IGx8930-Dec-01 11:53 
GeneralRe: Optimizing memory usage Pin
Konstantin Vasserman30-Dec-01 15:44
Konstantin Vasserman30-Dec-01 15:44 
GeneralRe: Optimizing memory usage Pin
IGx8930-Dec-01 15:58
IGx8930-Dec-01 15:58 
GeneralRe: Optimizing memory usage Pin
Konstantin Vasserman30-Dec-01 16:15
Konstantin Vasserman30-Dec-01 16:15 
Questionhow'd they do that? Pin
hforbess30-Dec-01 11:28
hforbess30-Dec-01 11:28 
AnswerRe: how'd they do that? Pin
Michael P Butler31-Dec-01 1:59
Michael P Butler31-Dec-01 1:59 
Generalfor example Pin
hforbess31-Dec-01 13:53
hforbess31-Dec-01 13:53 
GeneralSyntax colouring Pin
Jon Newman30-Dec-01 8:42
Jon Newman30-Dec-01 8:42 
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 

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.