嵌入开发(WinCE)的一些经验(3)

来源:本站
导读:目前正在解读《嵌入开发(WinCE)的一些经验(3)》的相关信息,《嵌入开发(WinCE)的一些经验(3)》是由用户自行发布的知识型内容!下面请观看由(电工技术网 - www.9ddd.net)用户发布《嵌入开发(WinCE)的一些经验(3)》的详细说明。
简介:嵌入开发(WinCE)的一些经验

1.好像没有其它方法,为什么不用__FILE__ 中取?

2.fopen,您可以加上全路径。

3.wince2.11没有用过,但我想是支持的。在CE帮助中,一般均说明此函数从那个版本开始支持,但fopen中却没有。

4.下面是CE帮助中的一段:

CWinApp::WriteProfileString

This method writes the specified string into the specified section of the .ini file in the application.

BOOL WriteProfileString(

LPCTSTR lpszSection,

LPCTSTR lpszEntry,

LPCTSTR lpszValue );

5.不知您所用的CE版本为多少。CE3.0不支持中文,如果您所用的是3.0,那一定是OEM商汉化了CE。可能只支持一种字体;最新版.Net支持中文,有多种字体供选择。

PC与掌上电脑的串口是不是一样,这很难说。因为嵌入式开发是针对不同硬件平台进行的!

有的掌上电脑用的是标准的RS232,有的不是。

您用EVT(EVC和EVB)写的串口操作程序,可以下载到开发板上进行测试。当然开发板上需有串口硬件。

Palm OS ROM

http://www.echoice.com.cn/download/download.asp?softwareID=132

Release configurations use the following macros:

RETAILMSG(cond, printf_exp). Conditionally displays the print message.

RETAILLED(cond, parms). Conditionally outputs WORD values to the LED.

ERRORMSG(cond, printf_exp). Prints "Error: File Line" before the print message.

To enable the debug macros, you must build a debug configuration. Debug configurations use the three retail macros listed above, as well as the following debug macros:

DEBUGMSG(cond, printf_exp). Conditionally displays the print message.

DEBUGLED(cond, parms). Conditionally outputs WORD values to the LED.

DEBUGCHK(expr). Asserts the expression. If expr is FALSE, the macro calls DEBUGBREAK.

DEBUGZONE(zone_id). Tests the mask bit in the current debug zone settings. You can use DEBUGZONE to turn debug zones on or off.

Declare Function TranslateMessage Lib "coredll.dll" (ByVal MSG As String) As Boolean

网上down到的,有关unicode的函数集:

Attribute VB_Name = "modUniCode"

Option Explicit

Public Function MemStringToLong(StringIn As String) As Long

On Error Resume Next

Dim hWorkVal As String

" Convert the String back to Long Integer.

" Converting back to Big Endian format.

Dim i As Long

For i = 4 To 1 Step -1

hWorkVal = hWorkVal & Hex(AscB(MidB(StringIn, i, 1)))

Next i

" Return Long Integer value.

MemStringToLong = CLng("&H" & hWorkVal)

End Function

Public Function LongToMemoryString(ByVal lInputValue As Long) As String

Dim hWorkVal As String

Dim n As Long

Dim i As Long

" Convert to HEX value.

hWorkVal = Hex(lInputValue)

" Check to see if it is not zero.

If hWorkVal <> "0" Then

" Convert to memory storage format (Little Endian).

" For example, 0000A411 would convert to 11A40000.

"

" Place leading zeros in 8 character sequence to

" maintain consistent character count

n = Len(hWorkVal)

If n < 8 Then

hWorkVal = String(8 - n, "0") & hWorkVal

End If

"

" Use ChrB to rebuild Bytes.

For i = 7 To 1 Step -2

LongToMemoryString = LongToMemoryString & _

ChrB(CInt("&H" & Mid(hWorkVal, i, 2)))

Next i

Else

" Just return zeros.

" Use ChrB to build Bytes.

LongToMemoryString = ChrB(CInt("&H00"))

LongToMemoryString = LongToMemoryString & ChrB(CInt("&H00"))

LongToMemoryString = LongToMemoryString & ChrB(CInt("&H00"))

LongToMemoryString = LongToMemoryString & ChrB(CInt("&H00"))

End If

End Function

在EVC3.0下怎样使编出来的窗口最大化(占满所有屏幕),并能够将开始菜单条挡住?

BOOL SHFullScreen(

HWND hwndRequester,

DWORD dwState);

注意包含Aygshell.h

用shfullscreen产生全屏窗口,用showwindow隐藏任务条,用movewindow设置窗口大小为全屏。

代码如下:

#define MENU_HEIGHT 26

RECT rc;

//get window size

GetWindowRect(hWnd, &rc);

SHFullScreen(hWnd, SHFS_HIDETASKBAR | SHFS_HIDESIPBUTTON);

ShowWindow(hwndCB, SW_HIDE);

MoveWindow(hWnd,

rc.left,

rc.top-MENU_HEIGHT,

rc.right,

rc.bottom+MENU_HEIGHT,

TRUE);

Windows CE 3.0 supports the standard Winsock 1.1 functions.except the asychronous functions.

eVC4:

http://msdn.microsoft.com/library/default.asp?url=/nhp/Default.asp?contentid=28000437

Tools(For PPC2002):

http://www.microsoft.com/mobile/developer/downloads/default.asp

OR: http://www.microsoft.com/mobile/developer/default.asp

CEF:

提醒:《嵌入开发(WinCE)的一些经验(3)》最后刷新时间 2024-03-14 01:07:14,本站为公益型个人网站,仅供个人学习和记录信息,不进行任何商业性质的盈利。如果内容、图片资源失效或内容涉及侵权,请反馈至,我们会及时处理。本站只保证内容的可读性,无法保证真实性,《嵌入开发(WinCE)的一些经验(3)》该内容的真实性请自行鉴别。