HINSTANCE ShellExecute(
HWND hwnd,
LPCTSTR lpOperation,
LPCTSTR lpFile,
LPCTSTR lpParameters,
LPCTSTR lpDirectory,
INT nShowCmd
);
hWnd:指向父窗口,用于接收返回消息。
lpOperation:指名执行何种操作,有编辑、浏览、打开等。
lpFile:指明执行操作的路径。
lpParameters:参数。
lpDirectory:默认目录。
nShowCmd:显示方式。
我在程序中实现了一个按钮,当点击它时就连到我的博客,就可以这么写:
ShellExecute(NULL,"open","http://blog.youkuaiyun.com/rainer7/",NULL,NULL,SW_SHOW);