DEVBUZZ Homepage Saddling the HTML View Control from eVB.
 
Web www.devbuzz.com
  HOME PAGE
  All Articles
  Advertise
  Consulting

 Development
  Discuss - Forums
  Still in the box?
  .Compact Framework
  Code Snippets
  SQL Server CE
  Database
  MS Resources
 Stores
  Developer Controls
  Pocket PC Hardware
  Pocket PC Software
  Pocket PC Books
  .NET CF Books
  Book Reviews
  SPB SW Discounts
  RESCO SW Discounts
 DEVBUZZ Info
  About Us
  Help
  Join our email list
  Links & Ratings
  Press & Comments
  Pocket PC version
  Software Reviews
  Hardware Reviews
 Authors
  Authors
  Article Guide
  Competitions
 Resources
  Developers
  Register
  Login

  SPB Discounts!
 Columnists
  Rick Winscot
 Past Blast
  Personal Media Ctr
  Gizmobility
  eVB Legacy
  Old news
  Hosted Software
  Wireless
  Newsletters
  Carl Davis
  Upton Au

 Pocket PC Registry
  Join the registry
  View current list
 Current Poll
Are you converting to .NET Compact Framework?
Yes, it has changed my life!
No, I'm sticking with eVB
.NET CF what's that`?

Current results
3431 votes so far
 Recent Forum Threads [goto forums]

Get Computername
read... (67 hits)


Great aid to development productivity
read... (82 hits)


ThreadingTimer sample code
read... (143 hits)


Multithreading with .NET CF
read... (194 hits)


Moving from eMbedded Visual Basic to Visual Basic .NET
read... (166 hits)


.NET Compact Framework 2.0 Service Pack 2
read... (226 hits)


Transfer Data from SQL Server 2000 to SQL Server Compact Edition
read... (298 hits)


This protocol version is not supported
read... (236 hits)


Converting Lowercase to uppercase wont work
read... (203 hits)


Direct access to MS SQL Server 2000
read... (374 hits)


Creating SDF file in Desktop
read... (513 hits)


Winsock in CF.NET
read... (316 hits)


Using Pocket Outlook to submit HTML page form with MAILTO action
read... (420 hits)


Missing file "System.Data.PocketPC.asmmeta.dll"
read... (268 hits)


HP iPAQ hw6915 Serial Port Issue
read... (309 hits)


Info on the recent forum changes
read... (341 hits)


SqlServer tools from Redgate
read... (383 hits)


Arrow keys and Hardware navigation button
read... (393 hits)


O2 XDA lls pin sync cable to comport
read... (322 hits)


Creating dynamic folders on Pocket PC OS
read... (299 hits)

Custom Windows Mobile software development.
LBS Challenge 2007
LBS Challenge Eight previous NAVTEQ Global LBS Challenge® participants have received venture capital funding and nine past LBS Challenge winners have launched commercial applications on major wireless carriers. Register your non-commercial LBS application in the 2007 NAVTEQ Global LBS Challenge in one of three regions: Americas, Europe-Middle East-Africa (EMEA) or Asia-Pacific(APAC). You could win a share of $2 million in prizes. This could be your year.
Dream. Develop. Win.

Development | Starting Out

Saddling the HTML View Control from eVB.
Written by Alex Yakhnin  [author's bio]  [read 45094 times]
Edited by Derek

eVB Ver 3.0   

Page 1  Page 2  Page 3
[Download the code] [Discuss this tutorial]

"To use HTML viewer control you need the eVC++..." - you might have heard. Well this is not "True" (that means it is "False"). All we need to create and use it is just the scant Microsoft Windows Platform SDK documentation that comes with eMbedded Tools and the "\include" directory in "Windows CE Tools" with the asociated header files. For all who are unfamiliar with C, header files are nothing more than functions, constants and structures (UDT's) declarations. I copied all the constant declarations from the htmlview.h file.

The Windows CE Documentation in the section "Creating an HTML Control for Pocket PC" supplies a very short code sample on it in C code, which we are going to implement in eVB. As a first step let's start with all the API function and constant declarations:

Create a new Pocket PC project, change the name of the default form to frmContainer
Insert a Module file and give it a name modHTMLview.
Insert the following code into this module:

'=========================================
' HTMLview control messages
Const DTM_ADDTEXT = 1125
Const DTM_ADDTEXTW = 1126
Const DTM_SETIMAGE = 1127
Const DTM_ENDOFSOURCE = 1128
Const DTM_ANCHOR = 1129
Const DTM_ANCHORW = 1130
Const DTM_ENABLESHRINK = 1131
Const DTM_FITTOWINDOW = 1132
Const DTM_SCROLLINTOVIEW = 1133
Const DTM_IMAGEFAIL = 1134
Const DTM_REALLYDONE = 1135
Const DTM_SELECTALL = 1135
Const DTM_ISSELECTION = 1136
Const DTM_CLEAR = 1137
Const DTM_ENABLECLEARTYPE = 1138
Const DTM_ENABLESCRIPTING = 1139
Const DTM_ZOOMLEVEL = 1140
Const DTM_LAYOUTWIDTH = 1141
Const DTM_LAYOUTHEIGHT = 1142
' Windows messages
Const WM_VSCROLL = &H115
Const GW_CHILD = 5
Const SB_PAGEDOWN = 3
Const SB_PAGEUP = 2
Const WM_COMMAND = &H111
Const WS_CHILD = &H40000000
Const WS_VISIBLE = &H10000000
Const WS_VSCROLL = &H200000
Const WS_CLIPSIBLINGS = &H4000000
Const WM_USER = &H400
Const WS_BORDER = &H800000
Const WM_SETTEXT = &HC
Const WS_HSCROLL = &H100000

Declare Function InitHTMLControl Lib "htmlview.dll" (ByVal hinst As Long) As Boolean
Declare Function LoadLibrary Lib "Coredll" Alias "LoadLibraryW" (ByVal lpLibFileName As String) As Long
Declare Function CreateWindow Lib "Coredll" Alias "CreateWindowExW" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, ByVal lpParam As String) As Long
Declare Function SetFocusAPI Lib "Coredll" Alias "SetFocus" (ByVal HWND As Long) As Long
Declare Function PostMessage Lib "Coredll" Alias "PostMessageW" (ByVal HWND As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Declare Function SendMessageString Lib "Coredll" Alias "SendMessageW" (ByVal HWND As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Declare Function SendMessageLong Lib "Coredll" Alias "SendMessageW" (ByVal HWND As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
'============================================

Next Page 

Back to Starting Out | [Article Index]

 

Back to the top of the page.
Chris De Herrera's Windows CE Website Windows CE News & Information Source
Copyright ©2000-2007 by DEVBUZZ.COM, Inc., NJ. USA.MSDEVELOP