#include <windows.h>
#include <tchar.h>
#include <assert.h>
const TCHAR szOperation[] = _T("open");
const TCHAR szAddress[] = _T("https://www.baidu.com/");
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR lpCmd, int
nShow)
{
HINSTANCE hRslt = ShellExecute(NULL, szOperation,
szAddress, NULL, NULL, SW_SHOWNORMAL);
assert(hRslt > (HINSTANCE)HINSTANCE_ERROR);
return 0;
}
C++ 调用默认浏览器 打开指定网址
最新推荐文章于 2025-05-20 21:03:19 发布