Home > Software engineering >  How to identify the content change of edit box and its contents to a file
How to identify the content change of edit box and its contents to a file

Time:10-12

Suppose I now program interface have 10 edit box, 10 edit box by reading a file according to different content, now I want to change one or several the contents of the edit box, and through a button to change its content written to read original data file,
Now the problem is how to identify which or which a few content change in the edit box and its written to the file, instead of every time change to 10 edit box content is written to the file,
For your guidance! Thank you very much!!

CodePudding user response:

They are right,,,

CodePudding user response:

reference 1st floor chengbar response:
compare yourself,,,

How do I compare?

CodePudding user response:

File does not support random insertion and deletion, you need to write the contents of all editing file, need you write at the same time also to clear the original file content,

CodePudding user response:

reference VisualEleven reply: 3/f
file does not support random insertion and deletion, you need to write the contents of all editing file, need you write at the same time also to clear the original file content,

Yes, I write is to replace the content of the original content of the file

CodePudding user response:

CodePudding user response:

This ID to get into a continuous set of buttons, and then map the same message, search ON_COMMAND_RANGE

CodePudding user response:

The text frame's change events seem to call ON_CHANGE response is rich with the news

CodePudding user response:

Because the file cannot be random writes,
Since all to write, then, that what does not get all the content, write directly, but also less complicated judgment which changed, to write to.

True judgment, so the logic of the
Application starts, the first time after loading the data, save the content of each edit box to memory (each edit box to define a cstrings variable holds the value).
When click on the save button, get the value of each edit box, and save the value comparison in cstrings, if there is any change. Then I do save work
The current value of latest update to cstrings variable.
The cycle.

CodePudding user response:

refer to 7th floor shenyi0106 response:
text box change events like call ON_CHANGE response is rich with the news

Don't understand your meaning, can give the code explain

CodePudding user response:

ON_CONTROL_RANGE (EN_CHANGE IDC_EDIT_SHIFT, IDC_EDIT_SPEED OnEnChange)

CodePudding user response:

references 9 f zzj010 response:
Quote: refer to 7th floor shenyi0106 response:

The text frame's change events like kuo call ON_CHANGE response this message to the

Don't understand what you mean, can I explain shows the code

This is a message of text box event, this message occurs when the text content change, as long as there is a message in the response process,
If in 2 bytes, 10 frames for you make a statement, the corresponding bit is "0" said no change, change, setting the corresponding bit in the response function, the last as long as the judge, if the statement is "0" shows no change, is greater than the "0" shows that there is a change, then the place value rewrite "1" the content of the corresponding frame,
  • Related