Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

COMµÄHTML¿Ø¼þ

http://www.experts-exchange.com/Programming/Languages/C/Q_24038236.html
/* CWebPage.c

This is a Win32 C application (ie, no MFC, WTL, nor even any C++ -- just plain C) that demonstrates
how to embed a browser "control" (actually, an OLE object) in your own window (in order to display a
web page, or an HTML file on disk).

This is very loosely based upon a C++ example written by Chris Becke. I used that to learn the minimum
of what I needed to know about hosting the browser object. Then I wrote this example from the ground up
in C.
*/


//begin code for systray

#define _WIN32_WINNT 0x0501 // clarity
#define _WIN32_IE 0x0601
#define assert(_Expression) (void)( (!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression), _CRT_WIDE(__FILE__), __LINE__), 0) )


#include <windows.h>
#include <stdlib.h> //for atoi() and _itoa()
#include <string.h>
// end code for systray
#include <exdisp.h> // Defines of stuff like IWebBrowser2. This is an include file with Visual C 6 and above
#include <mshtml.h> // Defines of stuff like IHTMLDocument2. This is an include file with Visual C 6 and above
#include <crtdbg.h> // for _ASSERT()
#include <shellapi.h> //for system tray and balloon tool-tips
#include <urlmon.h> //urlmon.lib must be added in Projects->setting->link->projects
#include <stdio.h>
#include <winsock2.h>
//#include <curl.h>
//#include "Auditor.h"
#include <Wininet.h>
#pragma comment(lib,"wininet.lib")


// net checing2 begin


//#include "afxsock.h"
#include <iostream.h>
//#include <stdafx.h>




//void main()
//{
// Generate an error

// if(!GetProcessId(NULL))
// ErrorExit(TEXT("GetProcessId"));
//}





// netchecking2 end



#define MAX_LINE_LENGTH 1024
// A running count of how many windows we have open that contain a browser object
unsigned char WindowCount =


Ïà¹ØÎĵµ£º

×ßÈëWebÐÂʱ´ú ÎÒÃÇÈçºÎÏòHTML 5¹ý¶É£¿

ÈçºÎÏòHTML 5¹ý¶É£¿
¡¡¡¡Web¿ª·¢ÉçÇøµÄ²»ÉÙÈËÈÏΪתÏòHTML 5Òª½÷É÷¡£±ÈÈ磬ËäȻ΢Èí¼Æ»®ÔÚIE9ÖÐÖ§³ÖHTML 5£¬µ«Õâ¼ÒÈí¼þÒµ¾Þ뢶ÔÓÚÔÚHTML 5»¹Ã»ÓÐÕýʽ³ÉΪ±ê׼֮ǰ֧³ÖËüÐÄ´æÒÉÂÇ¡£Î¢ÈíWindowsÊÂÒµ²¿×ܲÃSteven Sinofsky×î½ü½ÓÊܲɷÃʱ±íʾ£º“ÏÈ˵×Ô¼º»ùÓÚ±ê×¼£¬µ«ËæºóÓÖ˵ÄãÊÇ×î¼æÈÝHTML 5µÄä¯ÀÀÆ÷£¬ÕâÖÖ×ö·¨²»Ã÷ÖÇ£ ......

HTML ±êÇ©


¶¨ÒåºÍÓ÷¨
<!DOCTYPE> ÉùÃ÷λÓÚÎĵµÖеÄ×îÇ°ÃæµÄλÖ㬴¦ÓÚ <html> ±êǩ֮ǰ¡£´Ë±êÇ©¿É¸æÖªä¯ÀÀÆ÷ÎĵµÊ¹ÓÃÄÄÖÖ HTML »ò XHTML ¹æ·¶¡£
¸Ã±êÇ©¿ÉÉùÃ÷ÈýÖÖ DTD ÀàÐÍ£¬·Ö±ð±íʾÑϸñ°æ±¾¡¢¹ý¶É°æ±¾ÒÔ¼°»ùÓÚ¿ò¼ÜµÄ HTML Îĵµ¡£
ÒÔÏÂÃæÕâ¸ö <!DOCTYPE> ±êǩΪÀý£º
<!DOCTYPE html
PUBLIC "-//W3C//DT ......

µ÷Õûhtml½çÃæ±Ê¼ÇÕûÀí ²»¶Ï¸üÐÂ

Ò»¡¢img+ÎÄ×Ö ÔÚÒ»¸ödiv ÀïÃæÈçºÎ¾ÓÖÐ¶ÔÆë£¿
imgºÍÎı¾ÊÇÁ½ÖÖ²»Í¬µÄ½Úµã ËùÒÔÓõķ½·¨Ò²²»Ò»Ñù
ÎÄ×ÖÖ÷ÒªÒÀ¿¿ ¸¸½ÚµãµÄÐиßÀ´¾ÓÖÐ
¶øimgÐèÒªµÄÊÇ×ÔÉíµÄ´¹Ö±ÖÐÆëÊôÐÔ
div {line-heiht£º25px;height:25px;}
div img {vertical-align:middle;}
ÀýÈ磺
<div id="buttons">
     <img src= ......

HTML×ܽá

 
±ê Ç©      ÄÚ ÈÝ ±¸ ×¢
»ù ±¾ ±ê Ç© ËùÓÐHTMLÎļþ¶¼ÓеÄ
<html>……</html> ±íʾÎļþÀàÐÍΪHTMLÎĵµ
<head>……</head> ÉèÖÃÎĵµÃèÊö¼°ÆäËû²»ÔÚWEBÍøÒ³ÉÏÏÔʾµÄÐÅÏ¢ÍøÒ³µÄ±êÌ⣬Ñùʽ¶¨Ò壬Script
<body>……< ......

ѧϰHTMLʱ, ¼ÇϵÄһЩºÜ»ù´¡µÄ¶«Î÷

´«ÖDz©¿Í_html
1. HTMLÓï·¨»ù´¡
<     >    ¿Õ¸ñ    "      É̱ꠠ °æÈ¨   
&lt; &gt; &nbsp; &quot;  &reg;  &copy;
<p></p>¶ÎÂä±ê¼Ç
<br>»»Ðбê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ