For example, I have a Chinese character in a Static control.
How do I read it out and write it into another blank Static control?
There is also a function to clear a static control with a character?
First, you must change the ID of the Static control. You cannot use the default ID.
CString str;
GetDlgItem (IDC_STATIC1)-> GetWindowText (str);
GetDlgItem (IDC_STATIC1)-> SetWindowText ("");
GetDlgItem (IDC_STATIC2)-> SetWindowText (str);
UpdateData (FALSE);
This will satisfy all your requirements
First, you must change the id of this static control, you can not use the default (IDC_STATIC), and then use GetWidnowText or GetDlgItemText to get the text