#include "stdafx.h"
#include <Windows.h>
#include "resource.h"
#include <stdlib.h>
int _tmain(int argc, _TCHAR* argv[])
{
HWND hwnd=GetConsoleWindow();
SendMessage(hwnd,WM_SETICON,ICON_SMALL,(LPARAM)LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_ICON1)));
system("start http://zhanfu.92web.com");
return 0;
}
在具體實現過程中,根據具體的圖標ID進行資源替換。