Announcement

Collapse
No announcement yet.

DDT question about control IDs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DDT question about control IDs

    Does the ID for a control have to be unique in the dialog, or in the program?

    ie I would like to have similar 2 dialogs use the same group of control IDs, so I can use the same functions, and just pass and use the different dialog handle.

    Alternative ideas are to use a single dialog and dynamically add / remove the controls that vary between them; or set up the ID equates so that I can refer to them by number and add pass a parameter to add an offset to the ID numbers depending which dialog the function was called from.

    As always, many thanks in advance.
    Andy Upton
    Scotland

  • #2
    Unique to the dialog.

    You can have the same control IDs as long as they are used on different dialogs.
    Paul Squires
    FireFly Visual Designer (for PowerBASIC Windows 10+)
    Version 3 now available.
    http://www.planetsquires.com

    Comment


    • #3
      Originally posted by Andy Upton View Post
      I would like to have similar 2 dialogs use the same group of control IDs, so I can use the same functions, and just pass and use the different dialog handle.
      No problem. I use that approach and have tested with 100 dialogs and a single callback routine shared by them all.

      Comment

      Working...
      X