SetWindowText
-
Just starting out, Problem is that when I read a button name from a text file and assign it using a control variable and the setwindowtext function, i seem to get an extra character printed on the button. I am using fgets to read a string from a text file. Any help will be gratefully accepted. Phil
-
Just starting out, Problem is that when I read a button name from a text file and assign it using a control variable and the setwindowtext function, i seem to get an extra character printed on the button. I am using fgets to read a string from a text file. Any help will be gratefully accepted. Phil
It sounds like the string also contains the newline character.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
-
It sounds like the string also contains the newline character.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
-
Replace it with a
'\0'
character.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
-
Replace it with a
'\0'
character.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
;P Fetch the content in a CString type variable and then use the TrimRight() function with no parameters. When used with no parameters, TrimRight removes trailing newline, space, and tab characters from the string. Vikram Kashyap "You will never fail until you stop trying"
-
Replace it with a
'\0'
character.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
;P Fetch the content in a CString type variable and then use the TrimRight() function with no parameters. When used with no parameters, TrimRight removes trailing newline, space, and tab characters from the string. Vikram Kashyap "You will never fail, until you stop trying"