lpcware

emWin+LPC1788 skinnig question

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by yanvasilij on Thu Aug 16 23:21:18 MST 2012
Hello! I try to make window with 3 buttons, which have different SKIN FLEX properties. I want to make red on them, others green color. But when I exchange properties for one button all button widget become the same:
  BUTTON_SKINFLEX_PROPS Props, Props2;
  BUTTON_GetSkinFlexProps(&Props, BUTTON_SKINFLEX_PI_FOCUSSED);
  BUTTON_GetSkinFlexProps(&Props2, BUTTON_SKINFLEX_PI_FOCUSSED);
  Props.aColorUpper[0] = 0x000600F2;
  Props.aColorUpper[1] = 0x000600F2;
  Props.Radius         = 6;
  BUTTON_SetSkinFlexProps(&Props, BUTTON_SKINFLEX_PI_FOCUSSED);
  handle = WM_GetDialogItem(hWin, ID_BUTTON_STOP);
  BUTTON_SetSkin(handle, BUTTON_SKIN_FLEX);
  WM_InvalidateWindow(hWin);
  BUTTON_SetSkinFlexProps(&Props2, BUTTON_SKINFLEX_PI_FOCUSSED);

Haw can I fix it?

Outcomes