How to get the window ID?

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Hi,

    As Raash mentioned you can use the function WM_GetId(). But it will work only for widgets which have an id set. To get it working for normal windows you have to set a callback for the window and react on the message WM_GET_ID. When reacting on WM_GET_ID store the ID in pMsg->Data.v.

    More information are available in the emWin user manual in chapter 18.6.2 'List of messages' under the description of WM_GET_ID.

    Regards
    Sven
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.