Click here to Skip to main content
Click here to Skip to main content

High Speed Graphics Library for WinCE

By , 24 Jun 2002
 

Introduction

CEDraw is high speed graphics library in WinCE. It depends on GAPI . This code was written in C++ using embedded VC++ to compile it. Testing was done on an iPaq h3600 with WinCE 3.0. CEDraw use double buffer and direct write video buffer technology to enhance Draw speed. With its own graphics arithmetic the drawing speed is much faster than WinGDI.

CE Draw supports these functions:

  • Draw Pixel
  • Fill Screen
  • Draw Line,HLine,VLine
  • Draw Polyline
  • Draw Polygon
  • Draw Rectangle
  • Fill Rectangle ( with alpha blend support )
  • Fill Polygon
  • Draw Bitmap ( Support Bmp,Gif,Jpg format, Support alpha blend )
  • Draw Text ( Own font file, support Chinese, support gdi text )

How to use it

Before use the CEDraw Library, you must copy some support file in you system.

a. Copy the dll to you WinCE system directory

  1. If using in emulation mode, copy two of the dll in …\CEGraph\DLL\X86Em directory ( gx.dll & 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
  2. if using an Arm system, copy the two DLLs in …\CEGraph\DLL\Arm ( gx.dll & cegl.dll) to the Pocket PC windows system directory. Then copy the file HZK16 to the System Root directory.

There a 4 step to use it:

Step 1 Directory:

Set the including directory to …\CEGraph\Include
And lib directory to …\CEGraph\Lib\X86Em ( if using in emulation system) or …\CEGraph\Lib\Arm ( if using in pocketpc)

Open the project setting->Link->Object/library Modules 

Add CEGL.lib

Setp 2 Head file Including:

Include the cedraw graphics header file: CEGL.h

#include "stdafx.h"
#include "SDKSample.h"
#include <commctrl.h>

#include <cegl.h> // Include CE Graphics library

Step 3 Create the CE Draw Class:

// Create the CE Draw Object:
CCEDraw m_ceDraw;

// Initialize after CreateWindow()

BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)

{
    HWND hWnd;
    TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
    TCHAR szWindowClass[MAX_LOADSTRING]; // The window class name

    hInst = hInstance; // Store instance handle in our global variable
    // Initialize global strings
    LoadString(hInstance, IDC_SDKSAMPLE, szWindowClass, MAX_LOADSTRING);
    MyRegisterClass(hInstance, szWindowClass);
    LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
    hWnd = CreateWindow(szWindowClass, szTitle, WS_VISIBLE,
        0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), 
        NULL, NULL, hInstance, NULL);
    if (!hWnd)
    {
        return FALSE;
    }

    // Create the CE Grahpics Library
    m_ceDraw.Create( hWnd );

    ShowWindow(hWnd, nCmdShow);
    UpdateWindow(hWnd);

    return TRUE;
}

Step 4: Using CE Draw freely

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, 
                         WPARAM wParam, LPARAM lParam)
{
    HDC hdc;
    int wmId, wmEvent;
    PAINTSTRUCT ps;
    TCHAR szHello[MAX_LOADSTRING];

    switch (message)
    {
    case WM_PAINT:
        RECT rt;
        hdc = BeginPaint(hWnd, &ps);
        GetClientRect(hWnd, &rt);
        LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);
        DrawText(hdc, szHello, _tcslen(szHello), &rt,
            DT_SINGLELINE | DT_VCENTER | DT_CENTER);
        EndPaint(hWnd, &ps);

        Render(); // Render screen
        break;

        ...
    }
}

void Render( void )
{
    POINT pt[5] ={ { 140, 100 }, { 70,120 }, { 104, 150 }, 
                   { 210, 122 }, { 75, 200 } };

    // Create the ce pen object...
    CCEPen cePen;
    // Convert RGB color to CE support Color
    cePen.CreatePen( 1, 1, m_ceDraw.ConvertColor( 255, 0, 0 ) ); 

    // Select it to the graphics system
    m_ceDraw.SetGDIObject( &cePen );

    // Create the ce brush object...
    CCEBrush ceBrush1, ceBrush2;
    ceBrush1.CreateBrush( 1, m_ceDraw.ConvertColor( 200, 200, 100 ), 1 );
    ceBrush2.CreateBrush( 1, m_ceDraw.ConvertColor( 0, 240, 0 ), 1 );

    // Select it to the graphics system
    m_ceDraw.SetGDIObject( &ceBrush1 );

    // Begin Draw
    m_ceDraw.BeginDraw();
    m_ceDraw.Clear( (DWORD)255 ); // Clear screen use white color

    m_ceDraw.DrawLine( 1, 1, 100, 100 ); // Draw line

    m_ceDraw.DrawRect( 10, 10, 110, 80 ); // Draw Rect

    m_ceDraw.FillRect( 30, 30, 50, 50 ); // Fill Rect

    m_ceDraw.SetGDIObject( &ceBrush2 ); // Select another color brush
    m_ceDraw.FillRect( 40, 40, 100, 100, 0.4 ); // fill Rect with alpha blend

    m_ceDraw.FillPolygon( pt, 5 ); // Draw an polygon
    m_ceDraw.SetGDIObject( &ceBrush1 ); // Select another color brush
    m_ceDraw.FillPolygon( pt, 5, 40, 40 ); // Draw an polygon

    CCEBitmap ceBmp1,ceBmp2;

    // Load Gif picture from file
    ceBmp1.LoadBitmap( &m_ceDraw, L"windows\\wcelogo1.gif" );      
    ceBmp2.LoadBitmap( &m_ceDraw, L"windows\\welcomehead.gif" );

    // Draw bitmap with alpha blend
    ceBmp2.BitBlt( &m_ceDraw, 1, 80, 0, 0, 0, 0, SRCALPHA, 0.6f ); 
    ceBmp1.BitBlt( &m_ceDraw, 1, 200, 0, 0, 0, 0, SRCALPHA, 0.6f );

    POINT ptText = { 1, 300 };
    // Draw text with pen color
    m_ceDraw.DrawText( &ptText, "Hello CE Graph!", 16, 1 ); 

    // End Draw
    m_ceDraw.EndDraw();
    m_ceDraw.Flip(); // Flip the back buffer to the video buffer
}

Step 5:

Don’t forgot to release it:

case WM_DESTROY:
        m_ceDraw.Release();
        PostQuitMessage(0);
        break;

Tips:

This graphics library cannot be directly used in an MFC appwizard generated frame. Because it has two windows, one is frame window, the other is child Window. I’ve write a Framework that supports MFC. If anyone who want to use it in MFC  email me.

  • The CEGLDLLPrj is the dll project of CE Graphics Library. It's high recommend that if you want to use this library, use the project to build your own DLL & Lib Files. To Build this project. You Can setting the include directory and lib directory with ...\CEGraph\include & lib (The same as  Step 1 Directory )
  • The SDKSample Project is the sample NOT using MFC. Build it after setting & copying the library& DLL Files.


Comments

Please report any bugs or feedback to jiet@msn.com

Thanks

This Code using GAPI Enum. Thanks to the Writer.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Jie Tang
Web Developer
China China
Member
8 Years Development experience from MS-DOS v3.0 to WindowsXP in C/C++. Profession in Visual C++, Native Win32 and MFC programming, Embedded development.Computer Graphics(Computer Games),Network Program.
 
Living in China now.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralMy vote of 1member__PPS__27 Oct '09 - 15:55 
"...the drawing speed is much faster than WinGDI" No evidence or prove provided, therefore everything in the article is plain bullsh*t.
Generallinking error for wince4.0membersaurabhgoyal262 Sep '08 - 22:59 
hi
I tried to complile this for WinCE 4.0 and i got the following errors:
Linking...
Creating library emulatorDbg/CEGL.lib and object emulatorDbg/CEGL.exp
LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) struct GXKeyList __cdecl GXGetDefaultKeys(int)" (__imp_?GXGetDefaultKeys@@YA?AUGXKeyList@@H@Z) referenced in function "public: long __thiscall CCEGraphics::Create(stru
ct HWND__ *)" (?Create@CCEGraphics@@QAEJPAUHWND__@@@Z)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) struct GXDisplayProperties __cdecl GXGetDisplayProperties(void)" (__imp_?GXGetDisplayProperties@@YA?AUGXDisplayProperties@@XZ) referenced in function "public: long __t
hiscall CCEGraphics::Create(struct HWND__ *)" (?Create@CCEGraphics@@QAEJPAUHWND__@@@Z)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GXOpenInput(void)" (__imp_?GXOpenInput@@YAHXZ) referenced in function "public: long __thiscall CCEGraphics::Create(struct HWND__ *)" (?Create@CCEGraphics@@
QAEJPAUHWND__@@@Z)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GXOpenDisplay(struct HWND__ *,unsigned long)" (__imp_?GXOpenDisplay@@YAHPAUHWND__@@K@Z) referenced in function "public: long __thiscall CCEGraphics::Create
(struct HWND__ *)" (?Create@CCEGraphics@@QAEJPAUHWND__@@@Z)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GXCloseDisplay(void)" (__imp_?GXCloseDisplay@@YAHXZ) referenced in function "public: long __thiscall CCEGraphics::Release(void)" (?Release@CCEGraphics@@QAE
JXZ)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GXCloseInput(void)" (__imp_?GXCloseInput@@YAHXZ) referenced in function "public: long __thiscall CCEGraphics::Release(void)" (?Release@CCEGraphics@@QAEJXZ)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GXEndDraw(void)" (__imp_?GXEndDraw@@YAHXZ) referenced in function "public: long __thiscall CCEGraphics::Flip(void)" (?Flip@CCEGraphics@@QAEJXZ)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void * __cdecl GXBeginDraw(void)" (__imp_?GXBeginDraw@@YAPAXXZ) referenced in function "public: long __thiscall CCEGraphics::Flip(void)" (?Flip@CCEGraphics@@QAEJXZ)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GXSuspend(void)" (__imp_?GXSuspend@@YAHXZ) referenced in function "public: long __thiscall CCEGraphics::Suspend(void)" (?Suspend@CCEGraphics@@QAEJXZ)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GXResume(void)" (__imp_?GXResume@@YAHXZ) referenced in function "public: long __thiscall CCEGraphics::Resume(void)" (?Resume@CCEGraphics@@QAEJXZ)
emulatorDbg/CEGL.dll : fatal error LNK1120: 11 unresolved externals
Error executing link.exe.
 
CEGL.dll - 12 error(s), 0 warning(s)
 
Please help me to resolve this issue
Thanks
Saurabh Goyal
Generalcannot draw pics and textmembermenschMarkus1 Nov '07 - 0:21 
Hello
I ve downloaded this lib. It works fine but I have a problem.
 
If I try to load any pic or just draw a text using this lib, I get a compiler error
that a required dll is missing ( unresolved extern symbol ).
I am using VC 2005 pro.
 
Maybe any one has an idea?
 
greeting doena
GeneralLinking errorsmemberPriya_Sundar13 Aug '07 - 19:55 
Hi,
 
I am getting these linking errors, when i try to build the project after setting all the include and lib directories.
 
--------------------Configuration: CEGL - Win32 (WCE SH3) Debug--------------------
Linking...
Creating library SH3Dbg/CEGL.lib and object SH3Dbg/CEGL.exp
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) struct GXKeyList __cdecl GXGetDefaultKeys(int)" (__imp_?GXGetDefaultKeys@@YA?AUGXKeyList@@H@Z) referenced in function "public: long __cdecl CCEGraphics::Create(struct
HWND__ *)" (?Create@CCEGraphics@@QAAJPAUHWND__@@@Z)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) struct GXDisplayProperties __cdecl GXGetDisplayProperties(void)" (__imp_?GXGetDisplayProperties@@YA?AUGXDisplayProperties@@XZ) referenced in function "public: long __c
decl CCEGraphics::Create(struct HWND__ *)" (?Create@CCEGraphics@@QAAJPAUHWND__@@@Z)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GXOpenInput(void)" (__imp_?GXOpenInput@@YAHXZ) referenced in function "public: long __cdecl CCEGraphics::Create(struct HWND__ *)" (?Create@CCEGraphics@@QAA
JPAUHWND__@@@Z)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GXOpenDisplay(struct HWND__ *,unsigned long)" (__imp_?GXOpenDisplay@@YAHPAUHWND__@@K@Z) referenced in function "public: long __cdecl CCEGraphics::Create(st
ruct HWND__ *)" (?Create@CCEGraphics@@QAAJPAUHWND__@@@Z)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GXCloseDisplay(void)" (__imp_?GXCloseDisplay@@YAHXZ) referenced in function "public: long __cdecl CCEGraphics::Release(void)" (?Release@CCEGraphics@@QAAJXZ
)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GXCloseInput(void)" (__imp_?GXCloseInput@@YAHXZ) referenced in function "public: long __cdecl CCEGraphics::Release(void)" (?Release@CCEGraphics@@QAAJXZ)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GXEndDraw(void)" (__imp_?GXEndDraw@@YAHXZ) referenced in function "public: long __cdecl CCEGraphics::Flip(void)" (?Flip@CCEGraphics@@QAAJXZ)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void * __cdecl GXBeginDraw(void)" (__imp_?GXBeginDraw@@YAPAXXZ) referenced in function "public: long __cdecl CCEGraphics::Flip(void)" (?Flip@CCEGraphics@@QAAJXZ)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GXSuspend(void)" (__imp_?GXSuspend@@YAHXZ) referenced in function "public: long __cdecl CCEGraphics::Suspend(void)" (?Suspend@CCEGraphics@@QAAJXZ)
CEGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GXResume(void)" (__imp_?GXResume@@YAHXZ) referenced in function "public: long __cdecl CCEGraphics::Resume(void)" (?Resume@CCEGraphics@@QAAJXZ)
SH3Dbg/CEGL.dll : fatal error LNK1120: 10 unresolved externals
Error executing link.exe.
 
SDKSample.exe - 11 error(s), 0 warning(s)
 
Kindly help! Thankyou.

 
Priya Sundar

QuestionWhat about Ellipse?memberJeffrey T17 Apr '07 - 10:07 
I'm porting some codw to windows mobile and filled ellipse is
dog slow. Anyone have any GAPI code for this?
QuestionHow can I compile it using VS 2005?membermAlleXXX24 Sep '06 - 5:51 
How(Where) can I "add library CEGL.lib" to the Project?
 
When I try to compile, Studio gives me MANY "Unresolved links in SDKSample.obj"..
 
Help, please..
AnswerRe: How can I compile it using VS 2005?memberdzolee28 Sep '06 - 1:49 
Open Solution Properties. In the Linker section, go to Input.
Add the lib file to "Additional dependencies"
 
-or-
 
use pragma in the source like this:
 
#pragma comment(lib, "cegl.lib")

QuestionHow can i change the font size?membercyberjd14 Jun '06 - 9:52 
Hello
How can i change the font size?
thank you!
 
Jean
GeneralWindowsCE 5.0memberDevil Hill12 Feb '06 - 16:45 
does GAPI work on WinCE 5.0?? D'Oh! | :doh:
thx~~

GeneralRe: WindowsCE 5.0memberBloodRain20 Apr '06 - 9:12 
and does it can work on WinCE 4.2 or 5.0 ?
Thanks
QuestionHow do I Convert a JPG file to a BMP file using VC++?memberKirubanandam12 Jan '06 - 20:15 
Please, send the Program for how to convert a .jpg file to a .bmp file using VC++.
 
Thanks
 
Kiruba
GeneralFor ppc 2003memberedcedcedcedc17 Jun '05 - 5:06 
Hi Jie:
does any update for this project for ppc 2003 to download???
Thanks
 
Best Regards

QuestionDoes this work on current WinCE?memberDan McCarty18 Feb '05 - 5:37 
Has anyone gotten this thing to run with eVC under emulation? I went through a few steps with the SDKSample project included in the download:
1. Created a default configuration for the project (emulator debug)
2. Added include directory
3. Added lib directory
4. Commented out #include "GAPI_Emu.h", which didn't exist
5. Compiled an executable
6. Copied gx.dll and cegl.dll to my emulator Windows dir
7. Tried to run the exe: windows complains with a "SDKSample is not a valid Windows CE application."
 
Any ideas?
GeneralCEDraw with multipule windowsmemberccarr22 Nov '04 - 17:19 
How do I only draw within the hWnd that I pass CEDraw?
I know the library writes directly to the buffer.
Do I have to modify the source and recompile the library?
If so, how would I do that?
Is CEDraw only made for full screen applications?
Should I be looking for another graphics library?
 
What I am experiencing:
I have made a window smaller than the whole screen. But I can draw anywhere on the screen, which is fine, and when I click out of the area of my graph it takes me to the window that is behind the CEDraw window. The area that is outside of the portion that I draw on is black, and does not show the window behind it.
 
ccarr
GeneralRe: CEDraw with multipule windowsmemberccarr22 Nov '04 - 18:30 
CEDraw library cutout:************
HRESULT CCEGraphics::Create( HWND hWnd )
{
if( GXOpenDisplay( hWnd, GX_FULLSCREEN ) == 0 )
*******************
 
Windows CD API copy and paste***************
 
GXDLL_API int GXOpenDisplay (
HWND hWnd,
DWORD dwFlags
);
Parameters
hWnd
If requesting full screen mode, handle to the full screen window.
dwFlags
Specifies options for the screen mode. Value Description
GX_FULLSCREEN Use full screen mode.
***************
 
Yeah yeah, so I'm assuming I set the GX_FULLSCREEN to 0. But I can't seem to rebuild the dll and get the lib file as well. What is the deal? What should I be reading?
 
ccarr@6thdimensiondevices.com
General*SOLUTION* CEDraw with multipule windowsmemberccarr25 Nov '04 - 16:24 
Although the GAPI must have access to the full screen you only need to draw on part of it. The reson the rest of the screen was black was because the CCEGraphics::BeginDraw() method did not copy the current video buffer state into the buffer used to hold the changes to the display.
 
So just before the return statement of BeginDraw I added the following code:
 
...
//copys display memmory to the buffer used for drawing
m_pDisplayMemory = (unsigned char*)GXBeginDraw();
memcpy( m_pDoubleBuffer,
(m_pDisplayMemory + ( m_pDoubleBuffer - m_pVB ) ),
m_lMemorySize );
GXEndDraw();
...
 
ccarr@6thdimensiondevices.com
GeneralRe: *SOLUTION* CEDraw with multipule windowsmemberIbrahim4554353 Jul '06 - 2:28 
thank you
QuestionHow to use it in MFC based WinCE program ?memberjarell11 Oct '04 - 19:58 
How to use it in MFC based WinCE program ?
who can tell me about this...
 
thanks for your help.... Wink | ;)
AnswerRe: How to use it in MFC based WinCE program ?memberzjm1976082912 Feb '06 - 15:21 
Yes, I want to know.Thank you

GeneralRe: How to use it in MFC based WinCE program ?memberxindeng30 Mar '07 - 16:16 
Yew, I want to know too.
 
Thank you ...
 
Email:xinaideren2002@126.com
 
☆·D·E·N·G

GeneralRe: How to use it in MFC based WinCE program ?memberwcqq12319 Dec '11 - 20:54 
wcqq123@126.com
GeneralrotationsussAnonymous11 Oct '04 - 8:00 
I'd like to do rotation - but how?
GeneralCannot work on SH3 and TEXT problemmembermarce0025 Oct '04 - 16:25 
Hello
 
Is this only for ARM and PC emulator?? I cant find a way to run on SH3 Jornada 545, the compiler says: fatal error LNK1112: module machine type "ARM" conflicts with target machine type "SH3" .
Also when running on PC emulator (Evc++ 3.0) works fine but does not display any kind of text. I somebody can tell me why I would like to see it with a sample angle (scapment) example.
 
Best regards and thks for help!
GeneralRe: Cannot work on SH3 and TEXT problemsussAnonymous22 Nov '04 - 23:25 
Text: need font file in same folder as .exe file on PDA
 
ARM/SH3: Add the device to develop for to your project.
 
ccarr@6thdimensiondevices.com
GeneralUsing this in a DIALOGmemberAlex Evans27 Sep '04 - 19:44 
Hello
 
This class works fine for me on the front screen of my application, but moving it into a Dialog, it does NOT show the image, here is the simple Dialog class with my code, any suggestions will be appreciated.
 
Thanks
Alex
 
CCEDraw m_ceDraw;
 
ShowImage::ShowImage(CWnd* pParent /*=NULL*/)
: CDialog(ShowImage::IDD, pParent)
{ //{{AFX_DATA_INIT(ShowImage)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
 
void ShowImage::DoDataExchange(CDataExchange* pDX)
{ CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(ShowImage)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
 
BEGIN_MESSAGE_MAP(ShowImage, CDialog)
//{{AFX_MSG_MAP(ShowImage)
// NOTE: the ClassWizard will add message map macros here
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
 
BOOL ShowImage::OnInitDialog()
{
CDialog::OnInitDialog();
// I placed a static on the dialog, but even without it - NO SHOW
m_ceDraw.Create(GetDlgItem(IDC_EIMAGEHOLDER)->m_hWnd);
return TRUE;
}
 
void ShowImage::OnPaint()
{
m_ceDraw.Clear( (DWORD)255 ); // Clear screen use white color
CCEBitmap ceBmp2;
if(ceBmp2.LoadBitmap( &m_ceDraw, L"HS024.jpg"))
{
// Draw bitmap with alpha blend
ceBmp2.BitBlt( &m_ceDraw, 10, 10, 0,0 ,0,0, SRCALPHA, 0.8f );
m_ceDraw.Flip(); // Flip the back buffer to the video buffer
}
}

GeneralProblems trying CEGL in a x86sussJordi Ros24 Aug '04 - 3:30 
We're trying to use CEGL on a WinCE machine with a x86 (Pentium class). We use our own target machine (call it TEST), and we have an application running there.
I'm getting a "bad executable format" if I compile my app using the x86Emu CEGL libs and dlls, so I decided to build CEGL libs using machine TEST, but at linking time I get same problem as niceguyeddie
"EGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) struct GXKeyList __cdecl GXGetDefaultKeys .........
Seems a gx.lib problem, maybe because it is X86Emu compiled? Is there any version that runs on standard x86? Are the sources of GX available to compile?
Or is the problem another thing I missed
Thx

 
Jordi Ros
GeneralRe: Problems trying CEGL in a x86memberniceguyeddie7 Sep '04 - 11:25 
Yes thats the problem, x86 ver is not the same as x86Em. I have not been able to find GAPI for x86... don't think its out there. Haven't seen source code either...
 
Jordi or anybody, do you know of any other graphics libraries that can be used to make doing some rather complex graphics an easier task?
 
......tried getting a Macromedia Flash ActiveX Control for CE, no dice Sigh | :sigh:
GeneralCan't get it working on an x86 emulatormemberniceguyeddie13 Aug '04 - 6:30 
Maybe theres a CE guru that can help me out here::
 
I'm getting a "not valid Windows CE application" when I try and start the application. Followed the instructions to the tee and it won't work. Anyone else have this problem. Using CE 4.1, I used platform builder to make the SDK. Whats is not the valid application? The DLL or the APP? Anyone know how to diagnose from here?
 
So I thought , maybe CEGL.dll was no good so I'm also trying to compile that and having problems. I created my own project and inserted the files. Tried to compile linking with gx.lib. Compiled with no other errors other than:
 
EGraphics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) struct GXKeyList __cdecl GXGetDefaultKeys .........
 
It seems like the lib file isn't telling the compiler what it wants to see. Is this lib file good for x86??? Has anyone successfully got this working with emulation... Thanks in advance
GeneralRe: Can't get it working on an x86 emulatormemberniceguyeddie16 Aug '04 - 9:19 
okay - guess you gotta choose your directories more wisely than the way I did. One of the default libary dir's had a gx.dll in there so it was getting to the compiler first.. made sure the right one was getting to the compiler.
GeneralRe: Can't get it working on an x86 emulatormemberfreddy1ca21 Aug '04 - 23:24 
did you finish by run your project?
i'm interested
 
fred
GeneralRe: Can't get it working on an x86 emulatormemberniceguyeddie23 Aug '04 - 3:47 
I'm not sure I understand your question. i did finish by running the compiled bin on the emulator, yes.
GeneralHelp me &quot;Line Thick&quot;memberduydung2 Jul '04 - 9:31 
How to draw Line Thick???
GeneralHouston, we have a problem with the DrawText function (using LPCTSTR)memberthm18 Feb '04 - 5:04 
Hi,
 
I had a big problem when, in the example program, I try to call the DrawText function which use CString (LPCTSTR). The result is often a sort of italic text ! The string "Hello CE Graph!" was correctly displayed whereas the string "Hello AA Graph!" wasn't!
 
It took me days (I thought I was getting crazy) since I remember it. The BMP structure must have padding at the end of each line : 4 bytes alignment.
 
For example if the bitmap is 35 pixels wide. A 24bpp line is 24*35/8 = 105 bytes long. But 105 can't be divided by 4 (105 modulo 4 = 1). So, 3 padding bytes are needed at the end of the line : 108 can be divided by 4 !
 
I think I’m not the only one to have this problem so here is my little contribution.
 
I suggest the following modification in the CCEDraw::DrawText function.
 
Compute the padding before looping for each pixel.
 
int iRealLineLength = ((BitmapInfo.bmiHeader.biWidth * 3)+3) & ~3;
 
And use this computed value in the GetBitmapPointColor call like this.
 
GetBitmapPointColor(
pBitmap + ( nX ) * 3 +
( BitmapInfo.bmiHeader.biHeight - nY ) *
iRealLineLength )
 
That's all I have to say Smile | :)
 
Thanks for the job, it's going to be very useful for me !
 
Nico.

GeneralRe: Houston, we have a problem with the DrawText function (using LPCTSTR)memberHoyt F.16 Jun '04 - 4:18 
Were you able to use the library with Win CE 4.1? I am having difficulties linking in 4.1.
 
Hoyt F.
GeneralDLLs arex not theremembershubhs12 Feb '04 - 17:22 
Hello,
 
I have downloaded source . But DLLs are not present in DLL folder(gx.dll and cegl.dll).
 
Can you post code again??
GeneralDisplay map in Pocket PCmembersenhtahi3 Dec '03 - 4:19 
Hello everybody !!
How can i fix the map size in Pocket PC,because the map's picture size is too large ~ 65MB (5200x4800x32),that mean i want to see the map in the fixed status.
Another,How can i get the Pocket coordinate system,because I must convert from PC system into Pocket PC coordinate.
Thank you.

GeneralRe: Display map in Pocket PCsussSuperGuruHacker1 Jun '04 - 21:37 
What are you talking about ??
We don't understand what you're saying.
Are you insane or stupid ??
QuestionWhat about Windows CE 4.1memberAlpha Barry17 Jul '03 - 10:27 
Jie,
Is the Graphics Library available for Windows CE 4.1 for the following processors:
- Emulator
- and X86 ?
 
Cheers
AnswerRe: What about Windows CE 4.1memberJie Tang12 Sep '03 - 7:56 
hi ,sorry to replay u so late.
I'm planning to update this project to pocketpc 2003 ,,,
maybe few days later ,i'll put the new project into this website.
Cheers,
 
James T.
GeneralRe: What about Windows CE 4.1membercodehar31 Aug '04 - 20:55 
Hi Jie,
is the updated project for ppc 2003 ready for download??
 
Regards,
Harish
Generalwin ce 4.0 emulatormembermagic83 Apr '03 - 15:14 
Hello,
Can I implement this source code into a Win ce 4.0 standard emulator?
Thanks
Confused | :confused:
GeneralRe: win ce 4.0 emulatorsusstjaaaa9 Jun '03 - 5:27 
Now, i'm planning to add new features and rewrite some part of code. If you are interesting in this project, write email to me! jiet@msn.com
GeneralRe: win ce 4.0 emulatormembermonitomonito14 Apr '04 - 12:27 
And the same for win ce 3.0 emulator?
GeneralRe: win ce 4.0 emulatormemberfreddy1ca21 Aug '04 - 23:20 
i'm interested for the code for win ce 3.0 emulator
GeneralMIPSmemberemersonfernando18 Feb '03 - 2:27 
Hello,
Can I implement this source code into a Pocket PC 2000
with a MIPS processor? Confused | :confused:
Thanks
GeneralRe: MIPSsussAnonymous7 Jan '04 - 19:56 
I would also like to use this code or another graphics library on a MIPS device running Windows CE 2.11. Does anyone have any suggestions?
 
-Tim

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 25 Jun 2002
Article Copyright 2002 by Jie Tang
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid