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 =
相关文档:
Struts -- html:link 标签的使用
<html:link> 标签用于生成HTML <a> 元素。<html:link> 在创建超链接时,有两个优点:
(1) 允许在URL 中以多种方式包含请求参数。
(2) 当用户浏览器关闭Cookie 时,会自动重写URL,把SessionID 作为请求参数包含在URL 中,用于跟踪用户的Session 状态。
< ......
定义和用法
<!DOCTYPE> 声明位于文档中的最前面的位置,处于 <html> 标签之前。此标签可告知浏览器文档使用哪种 HTML 或 XHTML 规范。
该标签可声明三种 DTD 类型,分别表示严格版本、过渡版本以及基于框架的 HTML 文档。
以下面这个 <!DOCTYPE> 标签为例:
<!DOCTYPE html
PUBLIC "-//W3C//DT ......
<mce:style type="text/css"><!--
#summary{word-wrap:break-word;width:500px;margin: 0px;padding: 0px;};
.formIn th{white-space: nowrap;}
.formIn{ margin-left: 90px;}
--></mce:style><style type="text/css" mce_bogus="1"> #summary{word-wrap:break-word;width:50 ......
1.防止图片被下载和盗用的方法:
(1)<div>嵌套<img>设置<div>的背景图片为实际图片,<img>包含的图片是一张透明图片,两张图片的尺寸相同。即相当于在真实图片上添加了一层保护膜,这张保护膜就是透明图片。这样当用户选择“图片另存为”时,将保存的是透明图片,而不是实际图 ......
标记或参数
定 义
<A>
连结标记
<ADDRESS>
地址标记(斜体效果)
<AREA>
连结区域标记(设定各连结区域)
alink
点击连结时的样式。例:alink="#FF0000"
align
水平方向摆放位置。例:align="center"
alternate
来回走动,例:behavior=alternate
alt
在连结中插入文字说明。例:alt=" ......