|
From: nexolite on 13 May 2008 06:20 I have made a simple MFC(dialog based) program in which the dialog box has a CEdit box i have defined a DoDataExchange so my problem is whenever I do something like this for(i=0;;i++) { e=i; UpdateData(false); } where "e" is associated with the edit box The values as they should be instantaneously displayed in the box the moment they change, but nothing happens and dialog box freezes. but if I call a MessageBox("fh"); after UpDateData(false) then the message box is displayed and the value change is also displayed ,but I want it without this message box....plz help me
From: nexolite on 13 May 2008 08:05 even calling ::Sleep() does not helps! what should I do? "nexolite" wrote: > I have made a simple MFC(dialog based) program in which the dialog box has > a CEdit box i have defined a DoDataExchange > so my problem is whenever I do something like this > for(i=0;;i++) > { > e=i; > UpdateData(false); > } > where "e" is associated with the edit box > The values as they should be instantaneously displayed in the box the moment > they change, but nothing happens and dialog box freezes. > but if I call a MessageBox("fh"); after UpDateData(false) then the message > box is displayed and the value change is also displayed ,but I want it > without this message box....plz help me > >
From: David Wilkinson on 13 May 2008 08:22 nexolite wrote: > I have made a simple MFC(dialog based) program in which the dialog box has > a CEdit box i have defined a DoDataExchange > so my problem is whenever I do something like this > for(i=0;;i++) > { > e=i; > UpdateData(false); > } > where "e" is associated with the edit box > The values as they should be instantaneously displayed in the box the moment > they change, but nothing happens and dialog box freezes. > but if I call a MessageBox("fh"); after UpDateData(false) then the message > box is displayed and the value change is also displayed ,but I want it > without this message box....plz help me nexolite: I would use SetWindowText() here. Also, once your loop starts there is nothing to stop it, and you will have to kill the application. Better to use a timer. -- David Wilkinson Visual C++ MVP
From: nexolite on 13 May 2008 09:04 thnx David I used SetWindowText() but still the same problem dialog freezes any other attempt I can make? "David Wilkinson" wrote: > nexolite wrote: > > I have made a simple MFC(dialog based) program in which the dialog box has > > a CEdit box i have defined a DoDataExchange > > so my problem is whenever I do something like this > > for(i=0;;i++) > > { > > e=i; > > UpdateData(false); > > } > > where "e" is associated with the edit box > > The values as they should be instantaneously displayed in the box the moment > > they change, but nothing happens and dialog box freezes. > > but if I call a MessageBox("fh"); after UpDateData(false) then the message > > box is displayed and the value change is also displayed ,but I want it > > without this message box....plz help me > > nexolite: > > I would use SetWindowText() here. Also, once your loop starts there is nothing > to stop it, and you will have to kill the application. Better to use a timer. > > -- > David Wilkinson > Visual C++ MVP >
From: David Wilkinson on 13 May 2008 09:29 nexolite wrote: > thnx David I used SetWindowText() but still the same problem dialog freezes > any other attempt I can make? You might be able to get away with calling UpdateWindow() on the edit control (together with a Sleep()), but you would be much better to use a timer instead of your loop. -- David Wilkinson Visual C++ MVP
|
Next
|
Last
Pages: 1 2 3 Prev: How to move focus / active control using Enter key? Next: Control ID questron |