BREW 触摸屏幕代码实现:
#include "AEEPointerHelpers.h"
int x,y;
case EVT_POINTER_UP:
DBGPRINTF("----Receive msg: EVT_POINTER_UP ---");
DBGPRINTF("-%s",(char*)dwParam);
break;
case EVT_POINTER_DOWN:
DBGPRINTF("----Receive msg: EVT_POINTER_DOWN ---");
DBGPRINTF("-%s",(char*)dwParam);
AEE_POINTER_GET_XY((char*)dwParam, &x, &y); //取得屏幕触点坐标
DBGPRINTF("x=%d, y=%d", x, y);
if(x>200 && x < 240 && y>200 && y<240){ //固定区域触摸响应
DBGPRINTF("soft key 2");
}
DBGPRINTF("----Receive msg: EVT_POINTER_UP ---");
DBGPRINTF("-%s",(char*)dwParam);
break;
case EVT_POINTER_DOWN:
DBGPRINTF("----Receive msg: EVT_POINTER_DOWN ---");
DBGPRINTF("-%s",(char*)dwParam);
AEE_POINTER_GET_XY((char*)dwParam, &x, &y); //取得屏幕触点坐标
DBGPRINTF("x=%d, y=%d", x, y);
if(x>200 && x < 240 && y>200 && y<240){ //固定区域触摸响应
DBGPRINTF("soft key 2");
}
break;
case EVT_POINTER_MOVE:
DBGPRINTF("----Receive msg: EVT_POINTER_MOVE ---");
break;
case EVT_POINTER_MOVE:
DBGPRINTF("----Receive msg: EVT_POINTER_MOVE ---");
break;