From: martin-s Date: Sun, 19 Oct 2008 20:48:14 +0000 (+0000) Subject: Fix:graphics_win32:Made working for wince X-Git-Tag: navit-0.5.0.5194svn~3641 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5c77c8f8fc527f602ca2501448a3120173c66f4;p=profile%2Fivi%2Fnavit.git Fix:graphics_win32:Made working for wince git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1516 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- diff --git a/navit/navit/graphics/win32/graphics_win32.c b/navit/navit/graphics/win32/graphics_win32.c index 8fc52c5..bd76949 100644 --- a/navit/navit/graphics/win32/graphics_win32.c +++ b/navit/navit/graphics/win32/graphics_win32.c @@ -325,11 +325,16 @@ static const char g_szClassName[] = "NAVGRA"; HANDLE CreateGraphicsWindows( struct graphics_priv* gr ) { +#ifdef __CEGCC__ + WNDCLASS wc; +#else WNDCLASSEX wc; + wc.cbSize = sizeof(WNDCLASSEX); + wc.hIconSm = NULL; +#endif HWND hwnd; RECT rcParent; - wc.cbSize = sizeof(WNDCLASSEX); wc.style = 0; wc.lpfnWndProc = WndProc; wc.cbClsExtra = 0; @@ -340,8 +345,6 @@ HANDLE CreateGraphicsWindows( struct graphics_priv* gr ) wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wc.lpszMenuName = NULL; wc.lpszClassName = g_szClassName; - wc.hIconSm = NULL; - HANDLE hdl = gr->wnd_parent_handle; GetClientRect( gr->wnd_parent_handle,&rcParent); @@ -358,6 +361,9 @@ HANDLE CreateGraphicsWindows( struct graphics_priv* gr ) gr->width = rcParent.right - rcParent.left; gr->height = rcParent.bottom - rcParent.top; +#if defined(__CEGCC__) + (*gr->resize_callback)(gr->resize_callback_data, gr->width, gr->height); +#endif hwnd = CreateWindow( g_szClassName, "", @@ -781,7 +787,10 @@ static struct graphics_priv * graphics_win32_drawing_area_new_helper(struct grap struct graphics_priv* win32_graphics_new( struct navit *nav, struct graphics_methods *meth, struct attr **attrs) { - struct graphics_priv* this_=graphics_win32_drawing_area_new_helper(meth); + struct graphics_priv* this_; + if (!event_request_system("win32","graphics_win32")) + return NULL; + this_=graphics_win32_drawing_area_new_helper(meth); return this_; }