Hi All

I am using 5 textboxes for taking input from user in MFC VC++ application.
i want after filling 5 textboxes application should wait for 5 Seconds. and after that all entries should be clear and ready for next user input.

i had written function to clear input.
using

m_ed1 = "";
m_ed2 = "";
.
.
m_ed5 = ""; // these are variables associated with
// textboxes

but for the next input round the application clears the input. but i am not able to edit it. and the application takes by default "0" as value for all 5 textboxes.

Could anyone please help me in this...
I just want the textboes should be editable in next round ....
also is there built in function to clear all textboxes ??


Thanks
Mukesh:)

>>i want after filling 5 textboxes application should wait for 5 Seconds. and after that all entries should be clear and ready for next user input.

>>but for the next input round the application clears the input. but i am not able to edit it

you will have to make up your mind how you want this, you can't have it both ways. You can do what other database programs do and that is to add two more buttons titled "<<" and ">>" that let you scroll through the items you have already entered. The "<<" button retrieves and displays the previous record while the ">>" button retrieves and displays and record next in line after the current record.

Hi
Is there any way to load form by calling function?? Could please let me by calling which function the form will be loaded. i debug the code it starts with WINMAIN can we set the parameters so that empty form will be reloaded

Thanks
Mukesh

what do you mean by empty form? A form with no controls or buttons? Just set the properties of all the controls and buttons to be not visible, then your program will have to explicitly set the visibility property when desired.

No the form which i have designed.
with Edit controls...

The contents most form controls are always empty when first displayed. If you want them to display something then setl OnInitialUpdate() event handler.

I tried with SetFocus method but it is giving me error as

'SetFocus' : is not a member of 'CString'

what was the problem in using that ? I think the this will solve my problem if the SetFocus works...

SetFocus is a method of all CWnd derived classes, which include, but not limited to, edit controls, combo boxes, buttons, etc. You need a handle to the edit control that you want to set focus to.

CWnd* pWnd = GetDlgItem(IDC_EDIT1);
pWnd->SetFocus();
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.