^ _ ^, Finally made a software, ^ _ ^ now summed up 1, learn a class cstring this class is a string class inside the MFC. Today, I collected some related articles online, and read it carefully. In the future, start writing a program, feeling good A haha, it turns out this is also very easy to use, start using this class? ? Well, write a tool for processing files in a few days ago, see if you can use VC to implement, anyway, you have already opened files, and the process file should be able to do it by handling the read data and then writes files. Start yesterday's reading file, read the contents of the file to the object of M_File, then, the processing should be a special string, the last tool is used, the file is Conversion with 1/2000 similar numbers:, for example, a reduction of 10 times, etc., becomes: 1/20000, then this can be done: Scan the string, detect each character, if you encounter 2 characters, '1' and '/', Then read the next character string as the data to be processed, here should be done with the CSTRING member function MID, convert the intercepted substring with the ATOI () function to integent, multiply to expand The multiple, saved in: NEWNUM, convert the resulting number into a string with ITOA (NewNum, Newchar, 10), then replace the original string string by the following code: m_file.delete (i, j); m_file.insert (i, newchar);
Then you have to save the file, how do this do it? ? ? ^ _ ^, Check the MSDN, have this: // written by writing if (m_path == ") Return; cfile mfile (_t (_t (m_path), cfile :: modeWrite | cfile :: modeCreate); Mfile.write (m_file, m_file.getLength ()); mfile.flush (); mfile.close (); MessageBox ("Congratulations, file save success", "execution result", 0); ok, here's file Treatment is good, ^ _ ^, CSSRING feels quite easy to use, although it takes a lot of hard work to see the document, but it feels good. 2, Radio Button is now less than 4 o'clock, do something, right, give this: Radio Button, this hasn't been used yet, I don't know how to get their check value, how to assign them ? ? Check out. Worse, there is no information about this ~! ^ _ ^, Faint, will not be too simple, everyone know ......... ^ _ ^ No matter, since I don't know how others use, I will create one, I built a clicked event, see, I can't get a logo variable in the code, although I have a global variable, it is a bit .... but I can only use this, tomorrow to find some Take a book, there is no way, it seems to be here today! ~!