Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dos App to Windows Application

Status
Not open for further replies.

Leibniz

Programmer
Dec 22, 2007
25
0
0
CA
i have converted recently a dos program to a windows program using dialog box for interface but however due to the event driven nature of win32 programming (win32 API programming) i'm geting some dfficulties converting some part of the program, he is an example of a simple algorithm that ressembles closely enough what i am trying to do:

Code:
1)NO KEYWORD WAS FOUND FOR THIS INPUT, PLEASE ENTER A KEYWORD
2)SO THE KEYWORD IS: (key)
3)(if response is no)PLEASE RE-ENTER THE KEYWORD (go back to step #2)
4)NO RESPONSE WAS FOUND FOR THIS KEYWORD: (key) , PLEASE ENTER A RESPONSE
5)SO, THE RESPONSE IS: (resp)
6)(if response is no) PLEASE REENTER THE RESPONSE (go back to step #4)
7)KEYWORD AND RESPONSE LEARNED SUCCESSFULLY
8)IS THERE ANY OTHER KEYWORD THAT I SHOULD LEARN
9)(if response is yes, otherwise continue chating): PLEASE ENTER THE KEYWORD (go back to step #2)

the part i am geting problems with is how to force the application to wait for inputs in the approriate moments.
 
First thing is to design your form. Say it has

Code:
prompt                       Static text
 ________________
|________________|           Edit box

[ OK ]  [Cancel]             buttons
During the form design, if you double click on the edit box, it will generate the handler for the edit box. Modify the handler to check the response, then change the prompt to the responses specified in steps 1, 3, 6 and 8 depending on what came before. You'll probably need some sort of state machine for this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top