int CWnd::GetCheckedRadioButton(int nIDFirstButton, int nIDLastButton) const
{
for (int nID = nIDFirstButtonnID <= nIDLastButtonnID++)
{
if (IsDlgButtonChecked(nID))
return nID// id that matched
}
return 0// invalid ID
}
win32的基本控件通常只要包含windows.h即可
Process process = new Process()//实例process.StartInfo.CreateNoWindow = true/穗薯/设定不显示窗口
process.StartInfo.UseShellExecute = false
process.StartInfo.FileName = "cmd.exe"//设定程序名
process.StartInfo.RedirectStandardInput = true //猜拦者重定向标准输入
process.StartInfo.RedirectStandardOutput = true //重定向标准输出
process.StartInfo.RedirectStandardError = true//重定向衡橘错误输出
process.Start()
process.StandardInput.WriteLine("ipconfig")//执行的命令
process.StandardInput.WriteLine("exit")
process.WaitForExit()
process.Close()
return process.StandardOutput.ReadToEnd()
P.S. 顺便执行 ipconfig ,并返回执行结果。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)