diff --git a/include/LCUI_Build.h b/include/LCUI_Build.h index 4b3f9be5..8d6accf7 100755 --- a/include/LCUI_Build.h +++ b/include/LCUI_Build.h @@ -75,6 +75,7 @@ #define USE_LIBPNG #define USE_LIBJPEG #define USE_LCUI_BUILDER +#define ENABLE_TOUCH_SUPPORT #undef LCUI_THREAD_PTHREAD #undef LCUI_VIDEO_DRIVER_FRAMEBUFFER #else diff --git a/src/platform/windows/windows_display.c b/src/platform/windows/windows_display.c index a5424240..41475227 100644 --- a/src/platform/windows/windows_display.c +++ b/src/platform/windows/windows_display.c @@ -162,7 +162,9 @@ static void OnCreateSurface( void *arg1, void *arg2 ) 0, 0, NULL, NULL, instance, NULL ); +#ifdef ENABLE_TOUCH_SUPPORT RegisterTouchWindow( surface->hwnd, 0 ); +#endif surface->hdc_client = GetDC( surface->hwnd ); surface->hdc_fb = CreateCompatibleDC( surface->hdc_client ); surface->is_ready = TRUE; diff --git a/src/platform/windows/windows_mouse.c b/src/platform/windows/windows_mouse.c index e0d7d3ac..e32ee9ab 100644 --- a/src/platform/windows/windows_mouse.c +++ b/src/platform/windows/windows_mouse.c @@ -99,6 +99,7 @@ static void OnMouseMessage( LCUI_Event ev, void *arg ) sys_ev.wheel.y = mouse_pos.y; sys_ev.wheel.delta = GET_WHEEL_DELTA_WPARAM( msg->wParam ); break; +#ifdef ENABLE_TOUCH_SUPPORT case WM_TOUCH: { UINT i, n = LOWORD( msg->wParam ); PTOUCHINPUT inputs = NEW( TOUCHINPUT, n ); @@ -145,6 +146,7 @@ static void OnMouseMessage( LCUI_Event ev, void *arg ) } break; } +#endif default: break; } if( sys_ev.type != LCUI_NONE ) {