Click on the button corresponding to the function, decodes
: : ShellExecute (NULL, "open", "NotePad. Exe", "Ri. TXT", NULL, SW_SHOWNORMAL);
Open a TXT file, but there were no open notepad, but in a text box in the dialog box opens the contents of a text file, and is full of "hot" words, if a double-click to open the text file in folder, content with Chinese characters, letters and Numbers, were written in the program,
The question is, how to use the ShellExecute function calls "NotePad. Exe" to open the text file, not to open the content into the dialog box shown in the text box control for the code?
CodePudding user response:
Content is garbled, this has nothing to do with you open, can directly open the first, and see that inside the code, if it is in itself the code, then in what way you open all the same, also want to open a TXT file of execution, written the TXT file's path absolute pathCodePudding user response:
Directly open the t file, the content is right, contains Chinese characters, letters and Numbers, etc.Not tried as an absolute path, or
CodePudding user response:
Has built a project, found in the title statement is feasible givenThen drag a button to the dialog box, paste the statement to the button's onclick function, so that the
But the original functions under the button or not make, somehow the
CodePudding user response:
It's not right, you just: : ShellExecute (NULL, "open", "Ri. TXT", NULL, NULL, SW_SHOWNORMAL);
Have a try
CodePudding user response: