开发者

_popen: do not show the shell window (SW_HIDE)

开发者 https://www.devze.com 2022-12-13 22:46 出处:网络
When I execute the _popen command in c++ mfc it opens a shell window which I don\'t like, is it possible to make it hidden? for example when you try to execute commands with ShellExe开发者_如何学编程c

When I execute the _popen command in c++ mfc it opens a shell window which I don't like, is it possible to make it hidden? for example when you try to execute commands with ShellExe开发者_如何学编程cute function it has the option to hide the shell window with SW_HIDE.


Note from documentation:

If used in a Windows program, the _popen function returns an invalid file pointer that causes the program to stop responding indefinitely. _popen works properly in a console application. To create a Windows application that redirects input and output, see Creating a Child Process with Redirected Input and Output in the Platform SDK.

0

精彩评论

暂无评论...
验证码 换一张
取 消