#include<iostream>
using namespace std;
void main()
{
ShellExecute(this->m_hWnd,"open","http://www.google.com","","", SW_SHOW );}
它提示出错呢,我想实现的是,我一运行这程序,就打开google

解决方案 »

  1.   

    直接:
    ShellExecute(NULL, NULL, "http://www.google.com", NULL, NULL, SW_SHOWNORMAL);
      

  2.   

    那怎么才能实现
    我一运行这程序,就打开google
      

  3.   

    ShellExecute(this->m_hWnd,"open","http://www.google.com","","", SW_SHOW );这要如何改才行?
      

  4.   

    #include "stdafx.h"
    #include "shellapi.h"int APIENTRY WinMain(HINSTANCE hInstance,
                         HINSTANCE hPrevInstance,
                         LPSTR     lpCmdLine,
                         int       nCmdShow)
    {
      // TODO: Place code here.
    ShellExecute(NULL, "open", "http://www.microsoft.com", NULL, NULL, SW_SHOWNORMAL);  return 0;
    }
      

  5.   

    fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
    Error executing cl.exe.