exchanging data between dialogs

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

  • exchanging data between dialogs

    Hi
    Suppose I have a window with multiple edit objects, now when I click one of them another windows would appear and the user could change the values.

    I have called the CreatekeyPadWindow(); inside the case WM_NOTIFICATION_CLICKED: for edit objects,

    so the question is how should I pass the edit values to the keypad dialog for manipulation and return them back to the original window?

    I have used one global int for doing that for now, but the problem with that is that I have multiple windows and multiple edits on each and using a global variable is not a wise decision besides i can not tell which edit was clicked so where should I returned that data

    any Idea and help would be highly appreciated

    Regards
    Images
    • edits.jpg

      13.33 kB, 329×253, viewed 325 times
    • keypad.jpg

      31.82 kB, 320×251, viewed 370 times
  • Hi,

    You can use the function set user data to pass the handly of the clicked edit widget to the newly created keypad dialog.

    On the 'ok'-press you use this user data (the handle of the edit widget) to set an updated value.

    I have made an example which shows how this can be done (attached). Simply search for '/****/' to find the important parts.

    Regards
    Sven
    Files
    • KeyPad.zip

      (2.96 kB, downloaded 295 times, last: )
    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.