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

📄 high speed graphics library for wince.htm

📁 CEDraw是一个在WinCE中实现高速画图的库
💻 HTM
📖 第 1 页 / 共 5 页
字号:
              value=34>DirectX</OPTION> <OPTION value=35>字符串</OPTION> <OPTION 
              value=36>经典算法</OPTION> <OPTION value=37>数据库</OPTION> <OPTION 
              value=38>WinCE</OPTION> <OPTION value=39>综 合</OPTION> <OPTION 
              value=8>----==MFC/C++技术文章==----</OPTION> <OPTION 
              value=40>界面编程</OPTION> <OPTION value=41>网络编程</OPTION> <OPTION 
              value=42>各种控件</OPTION> <OPTION value=43>系统编程</OPTION> <OPTION 
              value=44>多媒体编程</OPTION> <OPTION value=45>数据库编程</OPTION> <OPTION 
              value=46>打印编程</OPTION> <OPTION value=47>字符串处理</OPTION> <OPTION 
              value=48>组件编程</OPTION> <OPTION value=49>数字与算法</OPTION> <OPTION 
              value=50>dll编程</OPTION> <OPTION value=51>其他编程</OPTION></SELECT> <INPUT class=border style="COLOR: #000000; BACKGROUND-COLOR: #efefef" type=submit value=搜索 name=search> 
            </P></FORM></TD></TR></TBODY></TABLE></TD></TR>
  <TR vAlign=top>
    <TD width=5 height=11></TD>
    <TD vAlign=top width="100%" height=1300><B>&gt;&gt; <A 
      href="http://www.vccode.com/file_index.php">MFC/C++</A> &gt; <A 
      href="http://www.vccode.com/file_list.php?type=38">WinCE</A></B> <BR>
      <TABLE borderColor=#111111 cellSpacing=1 cellPadding=4 width="100%" 
      bgColor=#cddaeb border=0>
        <TBODY>
        <TR>
          <TD align=middle bgColor=#4185d9><FONT face=verdana 
            color=#ffffff>如果只是索取,资源终将枯竭,只有大家都把经验共享出来,我们的思维才会充满活力。向所有发布文章的朋友致敬!<A 
            href="http://www.vccode.com/file_add.php" 
            target=_blank>VCCode在线发布文章</A> </FONT></TD></TR></TBODY></TABLE>
      <TABLE id=AutoNumber1 style="BORDER-COLLAPSE: collapse" 
      borderColor=#111111 cellSpacing=1 width="100%" bgColor=#efefef border=0>
        <TBODY>
        <TR>
          <TD width="75%" bgColor=#efefef colSpan=2 rowSpan=5><LEFT><FONT 
            style="FONT-SIZE: 16px; COLOR: #ff9900; FONT-FAMILY: 宋体"><B>High 
            Speed Graphics Library for WinCE</B></FONT> <BR><BR><BR>发布者: <A 
            href="http://www.vccode.com/member.php?action=getinfo&amp;username=soarlove">soarlove</A> 
            (<A 
            href="http://www.vccode.com/file_who_articlelist.php?s_username=soarlove">进入soarlove个人专栏</A>) 
          </TD>
          <TD width="25%" bgColor=#efefef></TD></TR>
        <TR>
          <TD width="25%" bgColor=#efefef>发布日期:2002.08.25 &nbsp; </TD></TR>
        <TR>
          <TD width="25%" bgColor=#efefef>升级次数:0 </TD></TR>
        <TR>
          <TD width="25%" bgColor=#efefef>今日浏览:2 </TD></TR>
        <TR>
          <TD width="25%" bgColor=#efefef>总浏览:7368 </TD></TR>
        <TR>
          <TD width="100%" bgColor=#efefef colSpan=3>
            <HR width="100%" color=gray SIZE=1>
          </TD></TR>
        <TR>
          <TD width="12%" bgColor=#efefef>评价等级: </TD>
          <TD width="63%" bgColor=#efefef>
            <TABLE cellSpacing=0 cellPadding=0 border=2>
              <TBODY>
              <TR>
                <TD><IMG height=5 
                  src="High Speed Graphics Library for WinCE.files/white.gif" 
                  width=20 border=0></TD>
                <TD><IMG height=5 
                  src="High Speed Graphics Library for WinCE.files/white.gif" 
                  width=20 border=0></TD>
                <TD><IMG height=5 
                  src="High Speed Graphics Library for WinCE.files/white.gif" 
                  width=20 border=0></TD>
                <TD><IMG height=5 
                  src="High Speed Graphics Library for WinCE.files/white.gif" 
                  width=20 border=0></TD>
                <TD><IMG height=5 
                  src="High Speed Graphics Library for WinCE.files/white.gif" 
                  width=20 border=0></TD></TR></TBODY></TABLE></TD>
          <TD width="25%" bgColor=#efefef rowSpan=2><A 
            href="http://www.vccode.com/file_download.php?id=268" 
            target=_blank><IMG title="下载 20020626170239_CEGraph.zip" 
            src="High Speed Graphics Library for WinCE.files/zip.gif" 
            border=0>代码下载</A> </TD></TR>
        <TR>
          <TD width="75%" bgColor=#efefef 
        colSpan=2>0位用户为此文章评分,平均分为0.0</TD></TR></TBODY></TABLE>
      <TABLE borderColor=#ffffff cellSpacing=0 width="100%" border=1 collapse>
        <TBODY>
        <TR>
          <TD vAlign=top width="100%"><BR><IMG height=399 
            src="High Speed Graphics Library for WinCE.files/other_wince_001_1.jpg" 
            width=268 border=0>
            <P></P>
            <P 
            style="TEXT-JUSTIFY: inter-ideograph; LINE-HEIGHT: 200%; TEXT-ALIGN: justify"><SPAN 
            style="FONT-SIZE: 11pt">程序说明:</SPAN></P>
            <P 
            style="TEXT-JUSTIFY: inter-ideograph; LINE-HEIGHT: 200%; TEXT-ALIGN: justify"><SPAN 
            style="FONT-SIZE: 11pt">原作者Jamestj ,下面是翻译的作者的说明。</SPAN></P>
            <P 
            style="TEXT-JUSTIFY: inter-ideograph; LINE-HEIGHT: 200%; TEXT-ALIGN: justify"><SPAN 
            style="FONT-SIZE: 11pt">介绍<BR><BR>CEDraw是一个在WinCE中实现高速画图的库。它的功能来源于GAPI。这段代码使用C++语法在embedded 
            VC++中编译。Testing was done on an iPaq h3600 with WinCE 
            3.0。CEDraw使用双缓冲和直接写入视频缓冲的方法提高了画图的速度。用它画图的速度比直接使用WinGDI画图的速度快得多。<BR><BR>CEDraw支持以下功能<BR>Draw 
            Pixel <BR>Fill Screen <BR>Draw Line,HLine,VLine <BR>Draw Polyline 
            <BR>Draw Polygon <BR>Draw Rectangle <BR>Fill Rectangle ( with alpha 
            blend support ) <BR>Fill Polygon <BR>Draw Bitmap ( Support 
            Bmp,Gif,Jpg format, Support alpha blend ) <BR>Draw Text ( Own font 
            file, support Chinese, support gdi text ) 
            <BR><BR>怎样使用<BR><BR>在使用CEDraw之前,你必须拷贝一些需要的文件到你的系统中。<BR>a.拷贝这个dll到你的WinCE系统目录<BR>1.If 
            using in emulation mode, copy two of the dll in …\CEGraph\DLL\X86Em 
            directory ( gx.dll &amp; cegl.dll) to the emulation windows system 
            directory, always in the D:\Windows CE Tools\wce300\MS Pocket 
            PC\emulation\palm300\windows directoty, then copy the file Hzk16 in 
            the …\CEGraph\Res directory to the WinCE Root directory, always in 
            D:\Windows CE Tools\wce300\MS Pocket PC\emulation\palm300 <BR>2.if 
            using an Arm system, copy the two DLLs in …\CEGraph\DLL\Arm ( gx.dll 
            &amp; cegl.dll) to the Pocket PC windows system directory. Then copy 
            the file HZK16 to the System Root directory. 
            <BR><BR>下面是你使用要做的4步:<BR><BR>1.目录<BR><BR>在include目录中加入…\CEGraph\Include<BR>如果你使用仿真系统,那么在lib目录中加入 
            …\CEGraph\Lib\X86Em <BR>如果你使用PockPC,那么在lib目录中加入 …\CEGraph\Lib\Arm 
            <BR>打开project setting-&gt;Link-&gt;Object/library Modules 
            <BR>加上CEGL.lib<BR><BR>2.加入头文件<BR><BR>加入CEDraw的头文件CEGL.h<BR><FONT 
            color=#800000>#include "stdafx.h"<BR>#include 
            "SDKSample.h"<BR>#include <COMMCTRL.H><BR><BR>#include <CEGL.H>// 
            Include CE Graphics library<BR></FONT><BR>3.创建CEDraw类<BR><BR><FONT 
            color=#800000>// Create the CE Draw Object:<BR>CCEDraw 
            m_ceDraw;<BR><BR>// Initialize after CreateWindow()<BR><BR>BOOL 
            InitInstance(HINSTANCE hInstance, int nCmdShow)<BR><BR>{<BR>HWND 
            hWnd;<BR>TCHAR szTitle[MAX_LOADSTRING]; // The title bar 
            text<BR>TCHAR szWindowClass[MAX_LOADSTRING]; // The window class 
            name<BR><BR>hInst = hInstance; // Store instance handle in our 
            global variable<BR>// Initialize global 
            strings<BR>LoadString(hInstance, IDC_SDKSAMPLE, szWindowClass, 
            MAX_LOADSTRING);<BR>MyRegisterClass(hInstance, 
            szWindowClass);<BR>LoadString(hInstance, IDS_APP_TITLE, szTitle, 
            MAX_LOADSTRING);<BR>hWnd = CreateWindow(szWindowClass, szTitle, 
            WS_VISIBLE,<BR>0, 0, GetSystemMetrics(SM_CXSCREEN), 
            GetSystemMetrics(SM_CYSCREEN), <BR>NULL, NULL, hInstance, 
            NULL);<BR>if (!hWnd)<BR>{<BR>return FALSE;<BR>}<BR><BR>// Create the 
            CE Grahpics Library<BR>m_ceDraw.Create( hWnd 
            );<BR><BR>ShowWindow(hWnd, 
            nCmdShow);<BR>UpdateWindow(hWnd);<BR><BR>return 
            TRUE;<BR>}<BR></FONT><BR>4.使用CEDraw<BR><BR><FONT 
            color=#800000>LRESULT CALLBACK WndProc(HWND hWnd, UINT message, 
            <BR>WPARAM wParam, LPARAM lParam)<BR>{<BR>HDC hdc;<BR>int wmId, 
            wmEvent;<BR>PAINTSTRUCT ps;<BR>TCHAR 
            szHello[MAX_LOADSTRING];<BR><BR>switch (message)<BR>{<BR>case 
            WM_PAINT:<BR>RECT rt;<BR>hdc = BeginPaint(hWnd, 
            &amp;ps);<BR>GetClientRect(hWnd, &amp;rt);<BR>LoadString(hInst, 
            IDS_HELLO, szHello, MAX_LOADSTRING);<BR>DrawText(hdc, szHello, 
            _tcslen(szHello), &amp;rt,<BR>DT_SINGLELINE | DT_VCENTER | 
            DT_CENTER);<BR>EndPaint(hWnd, &amp;ps);<BR><BR>Render(); // Render 
            screen<BR>break;<BR><BR>...<BR>}<BR>}<BR><BR>void Render( void 
            )<BR>{<BR>POINT pt[5] ={ { 140, 100 }, { 70,120 }, { 104, 150 }, 
            <BR>{ 210, 122 }, { 75, 200 } };<BR><BR>// Create the ce pen 
            object...<BR>CCEPen cePen;<BR>// Convert RGB color to CE support 
            Color<BR>cePen.CreatePen( 1, 1, m_ceDraw.ConvertColor( 255, 0, 0 ) 
            ); <BR><BR>// Select it to the graphics 
            system<BR>m_ceDraw.SetGDIObject( &amp;cePen );<BR><BR>// Create the 
            ce brush object...<BR>CCEBrush ceBrush1, 
            ceBrush2;<BR>ceBrush1.CreateBrush( 1, m_ceDraw.ConvertColor( 200, 
            200, 100 ), 1 );<BR>ceBrush2.CreateBrush( 1, m_ceDraw.ConvertColor( 
            0, 240, 0 ), 1 );<BR><BR>// Select it to the graphics 
            system<BR>m_ceDraw.SetGDIObject( &amp;ceBrush1 );<BR><BR>// Begin 
            Draw<BR>m_ceDraw.BeginDraw();<BR>m_ceDraw.Clear( (DWORD)255 ); // 
            Clear screen use white color<BR><BR>m_ceDraw.DrawLine( 1, 1, 100, 
            100 ); // Draw line<BR><BR>m_ceDraw.DrawRect( 10, 10, 110, 80 ); // 
            Draw Rect<BR><BR>m_ceDraw.FillRect( 30, 30, 50, 50 ); // Fill 
            Rect<BR><BR>m_ceDraw.SetGDIObject( &amp;ceBrush2 ); // Select 
            another color brush<BR>m_ceDraw.FillRect( 40, 40, 100, 100, 0.4 ); 
            // fill Rect with alpha blend<BR><BR>m_ceDraw.FillPolygon( pt, 5 ); 
            // Draw an polygon<BR>m_ceDraw.SetGDIObject( &amp;ceBrush1 ); // 
            Select another color brush<BR>m_ceDraw.FillPolygon( pt, 5, 40, 40 ); 
            // Draw an polygon<BR><BR>CCEBitmap ceBmp1,ceBmp2;<BR><BR>// Load 
            Gif picture from file<BR>ceBmp1.LoadBitmap( &amp;m_ceDraw, 
            L"windows\\wcelogo1.gif" ); <BR>ceBmp2.LoadBitmap( &amp;m_ceDraw, 
            L"windows\\welcomehead.gif" );<BR><BR>// Draw bitmap with alpha 
            blend<BR>ceBmp2.BitBlt( &amp;m_ceDraw, 1, 80, 0, 0, 0, 0, SRCALPHA, 
            0.6f ); <BR>ceBmp1.BitBlt( &amp;m_ceDraw, 1, 200, 0, 0, 0, 0, 
            SRCALPHA, 0.6f );<BR><BR>POINT ptText = { 1, 300 };<BR>// Draw text 
            with pen color<BR>m_ceDraw.DrawText( &amp;ptText, "Hello CE Graph!", 
            16, 1 ); <BR><BR>// End 
            Draw<BR>m_ceDraw.EndDraw();<BR>m_ceDraw.Flip(); // Flip the back 
            buffer to the video buffer<BR>}</FONT><BR><BR>5.不要忘记释放它<BR><BR><FONT 
            color=#800000>case 
            WM_DESTROY:<BR>m_ceDraw.Release();<BR>PostQuitMessage(0);<BR>break;</FONT><BR><BR>注意<BR><BR>这个库不能用于用MFC的appwizard产生的程序框架。因为它有两个窗口,一个是框架窗口,一个是子窗口。我另外写了一个支持MFC的工程,如果你需要的的话,写信给我。<BR><BR>作者信箱:jiet@msn.com<BR></SPAN></P>
        <TR>
          <TD ali

⌨️ 快捷键说明

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