Set/Get User Data in desktop window handle (WM_HBKWIN)

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

  • Set/Get User Data in desktop window handle (WM_HBKWIN)

    Hello everybody,

    I tried to set user data (WM_SetUserData()) at the WM window handle of the desktop window handle, but it doesn't work. That's why I'm asking if it is possible in general?
    My attention is to make data anyway available by creation of child windows of desktop window. I red in emWIn manual that WM_CREATE message has no data and there is no way to set data, I guess. Maybe anyone has a better idea to fix my problem?

    Thanks guys!
    Greetz Manfred
  • Hi Manfred,

    Unfortunately, this is not possible. To set user data it is required to tell the window how much additional data should be set. Since you have no access to the process of creating of WM_HBKWIN this won't work.

    But you can create another window with the size of the screen which overlays the WM_HBKWIN. This offers the possibility to set user data. Like this:

    C Source Code

    1. WM_CreateWindowAsChild(0, 0, xSize, ySize, WM_HBKWIN, WM_CF_SHOW, _cbWin, sizeof(pAdditonalData));


    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.