0

I am using new board from STM32 and I added simple page from GUIBuilder from software included to library. When I run my code I click for example on slider widget I have some error. Slider changed his value, but when I click in other part of screen (not fitted in widget) his value still will be changed. Whole screen have focus on this widget only. I use settings to LCD from CubeF7 delivered by STM32 for this dev kit. Also I included part of code responsible for my window which not working. Maybe someone have this same problem, or maybe I use wrong file.

static void _cbDialog(WM_MESSAGE * pMsg) {
  WM_HWIN hItem;
  int     NCode;
  int     Id;
  // USER START (Optionally insert additional variables)
  // USER END

  switch (pMsg->MsgId) {
  case WM_INIT_DIALOG:
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_0);
    TEXT_SetTextAlign(hItem, GUI_TA_LEFT | GUI_TA_VCENTER);
    TEXT_SetFont(hItem, GUI_FONT_32B_1);
    // USER START (Optionally insert additional code for further widget initialization)
    // USER END
    break;
  case WM_NOTIFY_PARENT:
    Id    = WM_GetId(pMsg->hWinSrc);
    NCode = pMsg->Data.v;
    switch(Id) {
    case ID_SLIDER_0: // Notifications sent by 'Slider'
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_RELEASED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_VALUE_CHANGED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    case ID_BUTTON_0: // Notifications sent by 'Button'
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_RELEASED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    case ID_BUTTON_1: // Notifications sent by 'Button'
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_RELEASED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    // USER START (Optionally insert additional code for further Ids)
    // USER END
    }
    break;
  // USER START (Optionally insert additional message handling)
  // USER END
  default:
    WM_DefaultProc(pMsg);
    break;
  }
}
MarCovy
  • 17
  • 9
  • I don't know that library, but that looks pretty complicated to me. At least it would explain the ST GUI library on my F429-DISCOVERY is so f**ing slow. Whoever designed that did not do a favour; the device could do much better. – too honest for this site Jul 24 '15 at 17:58
  • The library is called STemWin, the st, precompiled version of Seggers emWin graphical library. Unfortunately the gui builder is basic, if you want to do anything meaningful you have to do it by hand. Here's the link to the [manual](https://www.segger.com/cms/admin/uploads/productDocs/UM03001_emWin5.pdf). Start with intro and window manager sections. That said, I do not think the part of code you pasted is the problem. Check the size of your dialog widget, layer ordering, widget placement ... – Domen Kern Aug 07 '15 at 06:31

0 Answers0