WinCE 界面开发:使用HTML Browser Control
WinCE 界面开发:使用HTML Viewer Control
by cheungmine 2010-1
在Win32平台上用 C++做界面开发确实是很吃力的活。无论使用MFC还是ATL或者WTL都是很痛苦的。通常引入HTML控件,可以做出类似网页效果的精美布局。在传统的Windows应用程序中使用Web控件已是大势所趋,大大简化工作量。但是在WinCE平台上,做同样的事情,往往遇到很多困难。我自己摸索了半天,总结出下面的方法,效果还是很好的。
首先,使用WTL(WTL8.0 with VS2005)创建Windows Mobile 6的程序,选择新建项目ceWtl->WTL Mobile Application Wizard。
Platforms选择:Windows Mobile 6 Professional SDK。
Application Type:默认。
User Interface Features:勾选Use a view window,view type 选择Html Browser Control。
按Finish。
我仅修改默认生成的CeWtlFrame.h文件如下:
//cheungmine{{
我增加的部分
//cheungmine}}
// CeWtlFrame.h : interface of the CCeWtlFrame class
//
/////////////////////////////////////////////////////////////////////////////
#pragma once
//cheungmine{{
/**
OLEMethod
OLEMethod receives variable parameters. I.e., you can pass any number of parameters
depending on the property/method. Following is a summary of the OLEMethod() parameters,
* nType – Type of call to make, which can be any of the following values:
DISPATCH_PROPERTYPUT - Set property value
DISPATCH_PROPERTYGET - Get property value
DISPATCH_METHOD - Call a method
* pvResult – Return value for the call made; it can be another IDispatch object,
or an integer value, or a boolean, or so on..
* pDisp – IDispatch interface object for which the call is to be made.
* ptName – Property or method name.
&nb
相关文档:
有时候我们需要在Flex应用中嵌入HTML代码,根据嵌入HTML要求的不同有以下三种方法:
1、Flex文本组件(Label、Text、TextArea)的htmlText属性支持一些基本的HTML代码,例如:
<mx:TextArea>
<mx:htmlText>
<!--[CDATA[
<p align="center"><font size="15" color="#3399ff"> ......
<html>
<head>
<title>block and inline test</title>
</head>
<body>
<div>div1</div>
<div>div2</div>
<div>div3</div>
<span>span1</span>
<span>span2</span>
<span>span3</span>
</body& ......
1、文本标签(命令)
<pre></pre> 创建预格式化文本
<h1></h1> 创建最大的标题
<h6></h6> 创建最小的标题
<b&g ......
<div id='box_id' >test </div>
$('#box_ld').css("display","block");
注意:為input 添加只讀的樣式并不是
$("#gameuser_username").css("readonly","readonly");
而是
$("#gameuser_username").attr('readonly','readonly');
......
什么是Firebug
从事了数年的Web开发工作,越来越觉得现在对WEB开发有了更高的要求。要写出漂亮的HTML代码;要编写精致的CSS样式表展示每个页面模块;要调试javascript给页面增加一些更活泼的要素;要使用Ajax给用户带来更好的体验。一个优秀的WEB开发人员需要顾及更多层面,才能交出一份同样优秀的作业。为帮助广大正处于W ......