Hi !!!
I have created two windows:
hVel = WM_CreateWindow(0, 0, 800, 55,WM_CF_SHOW , _cbVel, 0);
hIcon = WM_CreateWindow(0, 55, 800, 268, WM_CF_SHOW, _cbIcon, 0);
When I pressed the windows repeatedly, I do not have problem with the WM_TOUCH message but, when I change between windows the cursor point for the right window, but the windows message is sent for the wrong window.
My callback function is:
static void _cbVel(WM_MESSAGE * pMsg) {
const WM_PID_STATE_CHANGED_INFO * pState = (const WM_PID_STATE_CHANGED_INFO *)pMsg->Data.p;
pState = (const WM_PID_STATE_CHANGED_INFO *)pMsg->Data.p;
switch (pMsg->MsgId) {
case WM_PAINT:
GUI_BMP_Draw(&_im_ext[imagem_ext.start[IM_VEL]], 0,0);
break;
case WM_PID_STATE_CHANGED:
icon_linha = pState->x /icon_width;
if(pState->State){
if((global_teste == 0x02) ((global_teste == 0x03))){
if(global_teste == 0x02)
global_teste = 0x03;
else
global_teste = 0x02;
}
else
global_teste = 0x02;
}
break;
default:
WM_DefaultProc(pMsg);
break;
}
static void _cbIcon(WM_MESSAGE * pMsg) {
const WM_PID_STATE_CHANGED_INFO * pState = (const WM_PID_STATE_CHANGED_INFO *)pMsg->Data.p;
pState = (const WM_PID_STATE_CHANGED_INFO *)pMsg->Data.p; switch (pMsg->MsgId) {
case WM_PAINT:
GUI_BMP_Draw(&_im_ext[imagem_ext.start[IM_ICON]], 0,0);
break;
case WM_PID_STATE_CHANGED:
icon_linha = pState->x /icon_width;
if(pState->State){
if((global_teste == 0x01) ((global_teste == 0x00))){
if(global_teste == 0x01)
global_teste = 0x00;
else
global_teste = 0x01;
}
else
global_teste = 0x00;
}
break;
default:
WM_DefaultProc(pMsg);
break;
}
What am I missing?
I have created two windows:
hVel = WM_CreateWindow(0, 0, 800, 55,WM_CF_SHOW , _cbVel, 0);
hIcon = WM_CreateWindow(0, 55, 800, 268, WM_CF_SHOW, _cbIcon, 0);
When I pressed the windows repeatedly, I do not have problem with the WM_TOUCH message but, when I change between windows the cursor point for the right window, but the windows message is sent for the wrong window.
My callback function is:
static void _cbVel(WM_MESSAGE * pMsg) {
const WM_PID_STATE_CHANGED_INFO * pState = (const WM_PID_STATE_CHANGED_INFO *)pMsg->Data.p;
pState = (const WM_PID_STATE_CHANGED_INFO *)pMsg->Data.p;
switch (pMsg->MsgId) {
case WM_PAINT:
GUI_BMP_Draw(&_im_ext[imagem_ext.start[IM_VEL]], 0,0);
break;
case WM_PID_STATE_CHANGED:
icon_linha = pState->x /icon_width;
if(pState->State){
if((global_teste == 0x02) ((global_teste == 0x03))){
if(global_teste == 0x02)
global_teste = 0x03;
else
global_teste = 0x02;
}
else
global_teste = 0x02;
}
break;
default:
WM_DefaultProc(pMsg);
break;
}
static void _cbIcon(WM_MESSAGE * pMsg) {
const WM_PID_STATE_CHANGED_INFO * pState = (const WM_PID_STATE_CHANGED_INFO *)pMsg->Data.p;
pState = (const WM_PID_STATE_CHANGED_INFO *)pMsg->Data.p; switch (pMsg->MsgId) {
case WM_PAINT:
GUI_BMP_Draw(&_im_ext[imagem_ext.start[IM_ICON]], 0,0);
break;
case WM_PID_STATE_CHANGED:
icon_linha = pState->x /icon_width;
if(pState->State){
if((global_teste == 0x01) ((global_teste == 0x00))){
if(global_teste == 0x01)
global_teste = 0x00;
else
global_teste = 0x01;
}
else
global_teste = 0x00;
}
break;
default:
WM_DefaultProc(pMsg);
break;
}
What am I missing?