⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 移动开发网(嵌入式系统开发wince软件开发开发工具下载) 首页.mht

📁 WinCE下的触控屏驱动程序源代码,很不错的一个嵌入式开发原代码.
💻 MHT
📖 第 1 页 / 共 5 页
字号:
                  width=3D0 border=3D0></TD>
                <TD width=3D5><IMG height=3D0=20
                  =
src=3D"http://www.biplip.com/Portals/0/Containers/BiplipContainer/spacer.=
gif"=20
                  width=3D5 border=3D0></TD></TR>
              <TR>
                <TD width=3D5><IMG height=3D0=20
                  =
src=3D"http://www.biplip.com/Portals/0/Containers/BiplipContainer/spacer.=
gif"=20
                  width=3D5 border=3D0></TD>
                <TD>
                  <TABLE cellSpacing=3D1 width=3D"100%" =
bgColor=3D#a7c1cf border=3D0>
                    <TBODY>
                    <TR>
                      <TD vAlign=3Dcenter bgColor=3D#d3e0e7>
                        <TABLE cellSpacing=3D0 cellPadding=3D0 =
width=3D"100%"=20
border=3D0>
                          <TBODY>
                          <TR>
                            <TD></TD>
                            <TD height=3D2></TD>
                            <TD></TD>
                            <TD width=3D"100%"></TD>
                            <TD></TD></TR>
                          <TR>
                            <TD vAlign=3Dcenter></TD>
                            <TD vAlign=3Dcenter height=3D16>&nbsp;</TD>
                            <TD vAlign=3Dcenter></TD>
                            <TD vAlign=3Dcenter width=3D"100%"><SPAN =
class=3DHead=20
                              =
id=3D_ctl0__ctl0_dnnTITLE_lblTitle></SPAN></TD>
                            <TD vAlign=3Dcenter></TD>
                            <TD vAlign=3Dcenter=20
                    width=3D2></TD></TR></TBODY></TABLE></TD></TR>
                    <TR>
                      <TD bgColor=3D#efefef>
                        <TABLE cellSpacing=3D0 cellPadding=3D0 =
width=3D"100%"=20
border=3D0>
                          <TBODY>
                          <TR>
                            <TD width=3D10><IMG height=3D0=20
                              =
src=3D"http://www.biplip.com/Portals/0/Containers/BiplipContainer/spacer.=
gif"=20
                              width=3D10 border=3D0></TD>
                            <TD id=3D_ctl0__ctl0_=D6=F7=C3=E6=B0=E5 =
align=3Dmiddle width=3D"100%"><!-- Start_Module_377 -->
                              <DIV id=3D_ctl0__ctl0_ModuleContent>
                              <TABLE width=3D700 border=3D0>
                                <TBODY>
                                <TR>
                                <TD align=3Dmiddle><SPAN =
class=3DNewsTitle=20
                                =
id=3D_ctl0__ctl0__ctl0_lblTitle>WinCE=CF=C2=B5=C4=B4=A5=BF=D8=C6=C1=C7=FD=
=B6=AF=B3=CC=D0=F2=D4=B4=B4=FA=C2=EB(MS=CC=E1=B9=A9)</SPAN>=20
                                </TD></TR>
                                <TR>
                                <TD height=3D3></TD>&nbsp;</TR>
                                <TR>
                                <TD align=3Dmiddle><SPAN=20
                                =
class=3DNormal>=D7=F7=D5=DF=A3=BA</SPAN><SPAN class=3DNormal=20
                                =
id=3D_ctl0__ctl0__ctl0_lblAuthor>Daric</SPAN><SPAN=20
                                class=3DNormal>&nbsp;&nbsp;</SPAN> <SPAN =

                                =
class=3DNormal>=C0=B4=D4=B4=A3=BA</SPAN><SPAN class=3DNormal=20
                                =
id=3D_ctl0__ctl0__ctl0_lblFromWhere>BIPLIP.com</SPAN><SPAN=20
                                class=3DNormal>&nbsp;&nbsp;</SPAN> <SPAN =

                                =
class=3DNormal>=CA=B1=BC=E4=A3=BA</SPAN><SPAN class=3DNormal=20
                                =
id=3D_ctl0__ctl0__ctl0_lblDateTime>2003=C4=EA1=D4=C28=C8=D5=20
                                20:15</SPAN><SPAN=20
                                class=3DNormal>&nbsp;&nbsp;</SPAN> <SPAN =

                                class=3DNormal>=D4=C4=B6=C1</SPAN><SPAN =
class=3DNormal=20
                                =
id=3D_ctl0__ctl0__ctl0_lblClicks>14030</SPAN><SPAN=20
                                class=3DNormal>=B4=CE</SPAN> </TD></TR>
                                <TR>
                                <TD height=3D10>&nbsp;</TD></TR>
                                <TR>
                                <TD><SPAN class=3DNormal=20
                                id=3D_ctl0__ctl0__ctl0_lblContent>&nbsp; =

                                <P align=3Dleft><STRONG></STRONG><A=20
                                =
href=3D"http://www.biplip.com/download/sourcecodes/TOUCH_CE.zip"><IMG=20
                                =
src=3D"http://www.biplip.com/Portals/0/NewsImgs/258-36546.gif"=20
                                border=3D0><FONT =
color=3D#000000>=CF=C2=D4=D8</FONT></A>=20
                                (32K)</P>
                                <P align=3Dleft>=A1=A1=A1=A1<FONT=20
                                =
color=3D#cc7033>=D2=F2=B4=F8=BF=ED=D7=CA=D4=B4=D3=D0=CF=DE=A3=AC=C8=E7=CE=
=DE=B7=A8=CF=C2=D4=D8=A3=AC=C7=EB=C9=D4=BA=F3=D6=D8=CA=D4=A1=A3</FONT></P=
>
                                <P>The touch screen driver reads input =
from=20
                                touch screen hardware and converts it to =
touch=20
                                events that are sent to the input =
system. The=20
                                driver is also responsible for =
converting=20
                                uncalibrated coordinates to calibrated=20
                                coordinates that take into account any =
hardware=20
                                anomalies, such as skew or nonlinear =
sequences.=20
                                </P>
                                <P>The driver must submit points while =
the=20
                                user"s finger or stylus is touching the =
touch=20
                                screen. When the user"s finger or stylus =
is=20
                                removed from the screen, the driver must =
submit=20
                                at least one final event indicating that =
the=20
                                user"s finger or stylus tip was removed. =
The=20
                                calibrated coordinates must be reported =
to the=20
                                nearest one-quarter of a pixel.</P>
                                <P>The following steps detail the basic=20
                                algorithm for using the touch screen:=20
                                <OL type=3D1>
                                <LI>Call <U><FONT=20
                                =
color=3D#050c0b>TouchPanelEnable</FONT></U> to=20
                                start the screen sampling.=20
                                <LI>Call <U>TouchPanelGetDeviceCaps</U> =
to=20
                                request the number of sampling points.=20
                                <LI>For every calibration point, perform =
the=20
                                following steps:=20
                                <OL type=3Da>
                                <LI>Call <U>TouchPanelGetDeviceCaps</U> =
to get a=20
                                calibration coordinate.=20
                                <LI>Draw a crosshair at the returned =
coordinate.=20

                                <LI>Call =
<U>TouchPanelReadCalibrationPoint=20
                                </U>to get calibration data. </LI></OL>
                                <LI>Call <U>TouchPanelSetCalibration =
</U>to=20
                                calculate the calibration coefficients.=20
                                </LI></OL>
                                <P>After executing this sequence, any =
finger or=20
                                stylus samples generated for the screen =
are=20
                                passed to the callback function =
specified in=20
                                <B>TouchPanelEnable</B>. The driver may =
pass=20
                                either calibrated or uncalibrated points =
to the=20
                                callback. If the driver has an efficient =

                                calibration algorithm, it can return =
calibrated=20
                                points. However, if the calibration is=20
                                computationally intensive, the driver =
may choose=20
                                to return uncalibrated points, rather =
than=20
                                perform extensive calculations in the=20
                                high-priority driver thread. The lower =
priority=20
                                thread processing points from the =
callback can=20
                                then perform the calibration. </P>
                                <P>You can calibrate your touch screen =
without=20
                                the ENTER key. The GWES keyboard code =
opens=20
                                =
<B>HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\KEYBD</B>=20
                                and looks for a <B>DWORD</B> value =
called=20
                                <B>Status</B>. This is a bit mask =
combining the=20
                                KBDI_KEYBOARD_XXX values from=20
                                =
%_WINCEROOT%\Public\Common\SDK\INC\Keybd.h. If=20
                                it is not found, GWES assumes=20
                                KBDI_KEYBOARD_PRESENT | =
KBDI_KEYBOARD_ENTER_ESC=20
                                | KBDI_KEYBOARD_ALPHA_NUM. This registry =
access=20
                                only occurs once, when the keyboard =
driver is=20
                                loaded. This value is the basis for what =
you get=20
                                when you call <U>GetKeyboardStatus</U>. =
GWES=20
                                will add or subtract the =
KBDI_KEYBOARD_ENABLED=20
                                bit based on =
<U>EnableHardwareKeyboard</U>=20
                                calls. The KBDI_KEYBOARD_ENABLED bit is =
set when=20
                                the keyboard driver is loaded. The=20
                                <B>UseEnterEsc</B> behavior can be =
controlled by=20
                                a registry key.</P>
                                <P>The following table shows the touch =
screen=20
                                driver functions.</P>
                                <DIV class=3Dtablediv>
                                <TABLE class=3DdtTABLE cellSpacing=3D0>
                                <TBODY>
                                <TR vAlign=3Dtop>
                                <TH width=3D"43%">Function</TH>
                                <TH width=3D"57%">Description</TH></TR>
                                <TR vAlign=3Dtop>
                                <TD =
width=3D"43%"><U>DdsiTouchPanelAttach</U></TD>
                                <TD width=3D"57%">Called when the MDD"s =
DLL entry=20
                                point gets a DLL_PROCESS_ATTACH=20
                                message.</TD></TR>
                                <TR vAlign=3Dtop>
                                <TD =
width=3D"43%"><U>DdsiTouchPanelDetach</U></TD>
                                <TD width=3D"57%">Called when the MDD"s =
DLL entry=20
                                point gets a DLL_PROCESS_DETACH=20
                                message.</TD></TR>
                                <TR vAlign=3Dtop>
                                <TD=20
width=3D"43%"><U>DdsiTouchPanelDisable</U></TD>
                                <TD width=3D"57%">Disables the touch =
screen=20
                                device.</TD></TR>
                                <TR vAlign=3Dtop>
                                <TD =
width=3D"43%"><U>DdsiTouchPanelEnable</U></TD>
                                <TD width=3D"57%">Applies power to the =
touch=20
                                screen device and initializes it for=20
                                operation.</TD></TR>
                                <TR vAlign=3Dtop>
                                <TD=20
                                =
width=3D"43%"><U>DdsiTouchPanelGetDeviceCaps</U></TD>
                                <TD width=3D"57%">Queries for =
capabilities of the=20
                                touch screen device.</TD></TR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -