- 浏览: 179137 次
- 性别:
- 来自: 南京
-
文章分类
最新评论
-
zhong504989:
你好。。请问你解决了么?我刚开始搞wap开发,用xhtml来, ...
ASP.NET Mobile Web Form 怎么设置背景图呢? -
xiaoqiang2008:
后台接收代码最好是用java写的
Windows Mobile 上传文件到服务器 -
xiaoqiang2008:
有后台接收的代码吗?能否贴上来看看,谢谢!
Windows Mobile 上传文件到服务器 -
guowee:
大家可以试着用一下ATL的HTML控件,不错的。
Windows mobile HTMLCtrl can not support WML ? -
guowee:
注意: 监控的文件夹名称最后不能有 \
windows mobile 监控 文件夹
[转载自MSDN:http://msdn.microsoft.com/en-us/library/ms838684.aspx]
Microsoft Internet Explorer for the Pocket PC lets you browse the wireless Web and view offline Web files. However the HTML Viewer Control gives these abilities and more to any application.
Applies to:
Microsoft Windows Powered Pocket PC 2000
Microsoft eMbedded Visual C++ version 3.0
VOImage classes (optional) available for free from Virtual Office Systems, Inc
GIF, JPG, and other types of files
Languages Supported
English
Creating the HTML Viewer Control
Before you can create a control you need a project with a main window. The following steps walk you through creating both your project and the HTML Viewer Control.
- From the Microsoft eMbedded Visual C++ 3.0 menu, select File and then select New .
- Select Projects and then, from the list of available project types, select WCE Pocket PC Application .
- In the Project Name edit control box, enter HTMLControl and click OK to start the project wizard.
- Select A Typical 'Hello World!' Application and then click Finish .
- In the confirmation dialog box, click OK to generate the source files. You now have a buildable project.
- From the Target Platform drop-down list box, select Win32 (WCE x86em) Debug
, as shown in Figure 1. (This can also be done by selecting Build
and then Set Active Configuration
from the menu and selecting the desired target platform.)
Figure 1: Select the target platform.
- Add
the following code (the lines of code you need to add are in red, the
other lines are there for reference only) near the top of the HTMLCONTROL.CPP
file:
#include <sipapi.h> #include <htmlctrl.h> #define IDC_HTMLVIEW 10 #define MAX_LOADSTRING 100
- Add the following global variable at the top of the HTMLCONTROL.CPP
file:
HWND hwndCB; // The command bar handle HWND hwndHTML; // HTML Control static SHACTIVATEINFO s_sai;
- Add the following function at the end of the HTMLCONTROL.CPP
file:
HWND CreateHTMLControl(HWND hwndParent) { RECT rc; DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_CLIPSIBLINGS; if(!InitHTMLControl( hInst )) MessageBox(hwndParent, TEXT("Unable to initialize HTML control"), TEXT("Error"), MB_OK); GetClientRect (hwndParent, &rc); return CreateWindow (DISPLAYCLASS, NULL, dwStyle, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, hwndParent, (HMENU)IDC_HTMLVIEW, hInst, NULL); }
- Call the CreateHTMLControl() function after the call to CreateRpCommandBar
() in the WM_CREATE processing code, and pass the hWnd of the application window as the hwndParent
parameter. Your WM_CREATE code should now look like this (new code is in red):
case WM_CREATE: hwndCB = CreateRpCommandBar(hWnd); hwndHTML = CreateHTMLControl(hWnd); SetFocus (hwndHTML); break;
- Add the following code to the message switch of the WndProc()
function (this will cause the HTML control to resize any time the parent window is resized):
case WM_SIZE: if(IsWindow(hwndHTML)) SetWindowPos(hwndHTML, 0, 0, 0, LOWORD(lParam), HIWORD(lParam) - MENU_HEIGHT, SWP_NOZORDER | SWP_NOMOVE); break;
Populating the HTML Viewer Control
Before populating the list control with HTML code, you should decide if you want to work with Unicode or single-byte text. Depending on which one you choose, you will send either the DTM_ADDTEXT or the DTM_ADDTEXTW message to the control. The one you use determines the format of text parameters in notification messages sent from the control to your application. I'll assume you want to use Unicode, because that is the default character set for most Pocket PC character strings.
To set the contents of the HTML Viewer Control, you need to:
- First clear the contents of the HTML Viewer Control by sending it a WM_SETTEXT message and an empty string.
- Send the HTML code to the HTML Viewer Control in one or more DTM_ADDTEXTW messages.
- Send the HTML Viewer Control a DTM_ENDOFSOURCE message.
The HTML code can come from a file, your code, or the Internet. To keep it simple, let's just generate the code in your sample project. Add the following code to your WM_CREATE message handler, after the SetFocus() line and before the break (the optional DTM_ENABLESHRINK message tells the control to attempt to fit the contents of the HTML page to the control width if possible):
BOOL fFitToPage = TRUE; PostMessage(hwndHTML, DTM_ENABLESHRINK, 0, fFitToPage); SendMessage(hwndHTML, WM_SETTEXT, 0, (LPARAM)""); SendMessage(hwndHTML, DTM_ADDTEXTW, FALSE, (LPARAM)TEXT("<HTML><TITLE>Test</TITLE>")); SendMessage(hwndHTML, DTM_ADDTEXTW, FALSE, (LPARAM)TEXT("<BODY><P>")); SendMessage(hwndHTML, DTM_ADDTEXTW, FALSE, (LPARAM)TEXT("<h1>Heading</h1>Normal Text<BR>")); SendMessage(hwndHTML, DTM_ADDTEXTW, FALSE, (LPARAM)TEXT("<A HREF=\"www.voscorp.com\"><IMG SRC=\"\\Pic.gif\"></A>")); SendMessage(hwndHTML, DTM_ADDTEXTW, FALSE, (LPARAM)TEXT("</BODY></HTML>")); SendMessage(hwndHTML, DTM_ENDOFSOURCE, 0, (LPARAM)NULL);
You will now have a control that contains the text (including the header style) from your HTML code, but if you run the application at this point you will notice that the image (\PIC.GIF ) is not displayed (as shown in Figure 2). To display images, your application needs to load the images in response to a notification event from the HTML Viewer Control.
Figure 2: HTML View Control without images.
Processing HTML Viewer Control Events
There are several notification messages from the HTML Viewer Control that you may wish to process. If you have no need for images, you may choose not to process the NM_INLINE_IMAGE message. Likewise, you may not want to process sounds, so you may choose not to process the NM_INLINE_SOUND message. Of course, anything you choose not to process will not be available to your users via the control.
To avoid having the (rather lengthy) code to handle the loading of GIF, JPG, BMP, and other code using IMGDECMP, this code assumes you are using the free VOImage class libraries from Virtual Office Systems, Inc to do the dirty work. To add image processing to your code, follow these steps:
- Add IMGDECMP.LIB to your list of library files to link to by selecting Project
, then Settings
, and then Link
from the menu.
Note that SHLoadImageFile and SHLoadImageResource should be used for Windows Mobile-based devices.
- Select All Configurations from the drop-down list box, and add IMGDECMP.LIB to the Object/Library Modules edit box.
- Add the VOIMAGE.CPP and VOIMAGE.H files to your project by selecting Project , then Add to Project , and then Files from the menu.
- Add a global CVOImage class variable to the HTMLCONTROL.CPP
file like this:
HWND hwndHTML; // HTML Control CVOImage img; // Interface to IMGDECMP.DLL static SHACTIVATEINFO s_sai;
- Add a WM_NOTIFY message to your window message procedure like this:
case WM_NOTIFY: switch(wParam) { case IDC_HTMLVIEW: { NM_HTMLVIEW* pnm = (NM_HTMLVIEW*)lParam; switch(pnm->hdr.code) { case NM_INLINE_IMAGE: { HDC dc = GetDC(hWnd); if(img.Load(dc, pnm->szTarget)) { INLINEIMAGEINFO imgInfo; imgInfo.dwCookie = pnm->dwCookie; imgInfo.iOrigHeight = img.GetHeight(); imgInfo.iOrigWidth = img.GetWidth(); imgInfo.hbm = img.Copy(); imgInfo.bOwnBitmap = FALSE; SendMessage(hwndHTML, DTM_SETIMAGE, 0, (LPARAM)&imgInfo); } else SendMessage(hwndHTML, DTM_IMAGEFAIL, 0, pnm->dwCookie); ReleaseDC(hWnd, dc); break; } // end case NM_INLINE_IMAGE: } // end switch(pnm->hdr.code) } // End case IDC_HTMLVIEW: } // End switch(wParam) break;
Note that we pass a copy of the HBITMAP to the DTM_SETIMAGE message by using the Copy() method of the VOImage object and setting bOwnBitmap to TRUE. This allows us to reuse the same VOImage object for multiple image files, and instructs the control to clean up the HBITMAP objects we have passed to it instead of relying on the calling code to do the cleanup.
- As desired, add case handlers for the NM_INLINE_SOUND message, NM_HOTSPOT (received when the user clicks on an HTML link), and any other HTML Viewer Control notification message type. You may want to process the NM_HOTSPOT message, displaying different HTML code depending on what was clicked.
Conclusion
The HTML Viewer Control allows you to include the rich interfaces to your application that users are used to seeing in Web browsers. What you do with the control is of course up to you, but as you can see in Figure 3, you can have quite an impressive interface with very little coding.
Figure 3: HTML View Control with images.
发表评论
-
Windows mobile 菜单(Menu Bar) 更改解决方案
2010-04-07 09:06 2555Windows Mobile 菜单(Menu Bar,C ... -
Windows CE/Windows Mobile开发常见问题解答
2009-12-17 14:44 18671.怎样在一个控件获得 ... -
WM/PPC程序与控制面板命令参数
2009-12-17 14:39 1908不完全正确,不过值得参考: WINDOWS目录下的程序(中英 ... -
PC中如何判断网络已经连接或者断开
2009-12-17 14:38 1694在PPC的开发中有时需要判断网络什么时候连接,什么时候断开,并 ... -
PPC中如何找到正在使用中的网络(源代码)
2009-12-17 14:36 992《PPC中如何判断网络已 ... -
在Windows mobile中如何更改短信会话模式
2009-11-04 11:57 1952在windows mobile 中如何更改短信的会话模式呢。 ... -
GPS短信接收 与 导航软件通信
2009-10-29 14:10 1544这是开这个博客的第一篇文章, 在这里开博客主要是为了写一下以前 ... -
windows mobile MAPI Set EntryID
2009-08-17 16:02 0void CSmsMessage::SetEntryID(SB ... -
控制Windows Mobile手机的键盘操作
2009-08-07 11:59 2753如何控制Windows Mobile 手 ... -
WinCE Dialog 添加 Scrollbar
2009-06-22 16:53 4319如何在WinCE上设置滚动条? 最近再搞winCE ... -
Windows mobile HTMLCtrl can not support WML ?
2009-06-01 10:58 1455最近在使用windows mobile上的HTMLCtrl的时 ... -
Windows Mobile 今日插件开发
2009-05-27 16:06 4060http://blog.csdn.net/doubleblue ... -
Mobile开发之路_之小总结
2009-04-18 22:20 18501,从那种基本类中继承的函数 变异时都会自动被调用 2,vo ... -
Windows Mobile中使用htmlCtrl控件
2009-04-18 22:16 2440在某些特殊的应用场合,我们很想要一个类似IE功能的模块,定制自 ... -
推荐几篇关于Windows Mobile程序安装包制作的文章
2009-03-13 15:39 3559转载至:http://www.cnblogs.com/upt ... -
Hiding the Progress Bar of a .NET 2.0 CF WebBrowse
2009-03-11 14:08 1599[转载自:http://www.chriskarch ... -
如何处理屏幕方向改变
2009-03-01 10:02 1212在Windows Mobile平台的应用程序开发过程中, ... -
Windows Mobile中GPRS连接网络
2009-03-01 09:58 1726Windows Mobile程序中如果 ... -
Outgoing SMS intercepting
2009-02-27 14:33 1133http://social.msdn.microsoft.co ... -
CE MAPI实例讲解【http://heliboy110.blog.163.com/blog/s】
2009-02-27 14:32 1975(一)如何获取Inbox里的所有消息 第一次写这玩意,感 ...
相关推荐
5)....Added: Exception2HRESULT in EAppDLL to simplify developing DLLs with "DLL" profile 6)....Added: Use ShellExecute option for mailto send method 7)....Added: "Mandatory e-mail only when sending" ...
demo.zip Some simple functions for system stats(34KB)<END><br>34,SysEvent.zip WindowsNT Event Log Viewer(59KB)<END><br>35,SysMangr.zip This article presents a comprehensive system control ...
System Viewer Instrumentation Support ...................................................... 17 Real-Time Process Support .................................................................................
在如今社会上,关于信息上面的处理,没有任何一个企业或者个人会忽视,如何让信息急速传递,并且归档储存查询,采用之前的纸张记录模式已经不符合当前使用要求了。所以,对学生毕业设计信息管理的提升,也为了对学生毕业设计信息进行更好的维护,毕业设计系统的出现就变得水到渠成不可缺少。通过对毕业设计系统的开发,不仅仅可以学以致用,让学到的知识变成成果出现,也强化了知识记忆,扩大了知识储备,是提升自我的一种很好的方法。通过具体的开发,对整个软件开发的过程熟练掌握,不论是前期的设计,还是后续的编码测试,都有了很深刻的认知。 毕业设计系统通过MySQL数据库与Spring Boot框架进行开发,毕业设计系统能够实现教师管理,公告类型管理,班级管理,课题信息管理,任务类型管理,选题申请管理,学院管理,课题任务管理,最终成绩管理,公告信息管理,学生管理等功能。 通过毕业设计系统对相关信息的处理,让信息处理变的更加的系统,更加的规范,这是一个必然的结果。已经处理好的信息,不管是用来查找,还是分析,在效率上都会成倍的提高,让计算机变得更加符合生产需要,变成人们不可缺少的一种信息处理工具,实现了绿色办公,节省社会资源
hegaojian_WanAndroid_1742851819.zip
资源内项目源码是来自个人的毕业设计,代码都测试ok,包含源码、数据集、可视化页面和部署说明,可产生核心指标曲线图、混淆矩阵、F1分数曲线、精确率-召回率曲线、验证集预测结果、标签分布图。都是运行成功后才上传资源,毕设答辩评审绝对信服的保底85分以上,放心下载使用,拿来就能用。包含源码、数据集、可视化页面和部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.txt文件,仅供学习参考, 切勿用于商业用途。
毕业设计
移动开发_iOS_OpenUrl_快捷方式创建技术_App桌_1742856949.zip
资源内项目源码是来自个人的毕业设计,代码都测试ok,包含源码、数据集、可视化页面和部署说明,可产生核心指标曲线图、混淆矩阵、F1分数曲线、精确率-召回率曲线、验证集预测结果、标签分布图。都是运行成功后才上传资源,毕设答辩评审绝对信服的保底85分以上,放心下载使用,拿来就能用。包含源码、数据集、可视化页面和部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.txt文件,仅供学习参考, 切勿用于商业用途。
app开发
蓝桥杯python相关资源
招聘_实时聊天_APP_React_Redux_前后端分离_1742854279.zip
资源内项目源码是来自个人的毕业设计,代码都测试ok,包含源码、数据集、可视化页面和部署说明,可产生核心指标曲线图、混淆矩阵、F1分数曲线、精确率-召回率曲线、验证集预测结果、标签分布图。都是运行成功后才上传资源,毕设答辩评审绝对信服的保底85分以上,放心下载使用,拿来就能用。包含源码、数据集、可视化页面和部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.txt文件,仅供学习参考, 切勿用于商业用途。
vsco1.98.1版本,适用于macos
资源内项目源码是来自个人的毕业设计,代码都测试ok,包含源码、数据集、可视化页面和部署说明,可产生核心指标曲线图、混淆矩阵、F1分数曲线、精确率-召回率曲线、验证集预测结果、标签分布图。都是运行成功后才上传资源,毕设答辩评审绝对信服的保底85分以上,放心下载使用,拿来就能用。包含源码、数据集、可视化页面和部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.txt文件,仅供学习参考, 切勿用于商业用途。
Kotlin_基础篇教程_函数与类实践_开发参考_1742851889.zip
电子发票统计并生成表格
网上很多都是IIS7的教程ARR,对IIS10来说已经无效了。这个是最新的插件IIS重写IIS rewirte的插件ARR(Application Request Routing)
linux系统相关知识、shell编程相关知识、虚拟机安装及配置
还在为毕业设计选题纠结?这款基于 thinkphp6 框架 开发的学生成绩管理系统源码,前端采用 X - adminV2.2,功能完备、结构清晰,完美适配毕业设计需求,助你在答辩中脱颖而出! 功能全面,轻松应对毕设考核 全流程管理模块:覆盖系统信息设置、单位信息管理、类别管理,以及学期、班级、学科等基础配置,更有管理员、权限、角色管理,完整呈现系统设计与实现的深度。 智能化成绩处理:支持考试信息自定义,灵活设置学科分数线;一键生成考试号、试卷标签、成绩采集表。多样化成绩录入(在线、表格、扫码枪)、实时查看成绩列表与图表,统计结果以柱形图、折线图、雷达图等形式展示,搭配学生历次成绩对比(表格 + 折线图),充分展现数据处理与分析能力。 精细化权限设计:区分教师、学生双身份登录,按职务、任务分工细化数据权限,体现系统安全性与合理性,为毕设增添专业亮点。 三大核心优势,锁定高分 极简操作,演示无忧:界面简洁直观,操作流程优化至 “三步到位”,答辩演示流畅自然,轻松征服导师。 热门技术栈,学习轻松:基于流行的 thinkphp6 框架,前端 X - adminV2.2,前后端分离。