Saturday, April 21st 2018, 11:22pm UTC+2

You are not logged in.

  • Login
  • Register

Date of registration: Jan 3rd 2013

Posts: 5

1

Friday, January 4th 2013, 9:42am

TOUCH not working?

void WinHandler(WM_MESSAGE * pMsg)
{

switch (pMsg->MsgId)
{
case WM_PAINT:
GUI_SetBkColor(0xFF00);
GUI_Clear();
GUI_DispStringAt("Hello world",0,0);
break;
case WM_CREATE:
hButton = BUTTON_Create(0,0,50,50,1,WM_CF_SHOW);
BUTTON_SetText(hButton,"Press");
break;
case WM_TOUCH:
if(BUTTON_IsPressed(hButton)==1) GUI_DispString("buttona basildi\n");

default:
WM_DefaultProc(pMsg);
}
}

void sdram_init(void);

int main(void)
{
WM_HWIN hid;

SystemInit();
SystemCoreClockUpdate();
SysTick_Config(SystemCoreClock / 1000);
sdram_init();//buna bir hal çare bulmaliyim
GUI_Init();
WM_CreateWindow(20,20,100,100,WM_CF_SHOW ,WinHandler,0);

while(1)
{
GUI_Delay(1);
}
}

ı dont understand where am ı wrong? Please help?

Date of registration: May 26th 2009

Posts: 1,022

2

Tuesday, January 8th 2013, 11:46am

Please read the chapter "The Window Manager" in the emWin documentation.

Best regards,
Adrian