Link to home
Start Free TrialLog in
Avatar of murrayc
murrayc

asked on

Subclassing dynamically created control (No ID)

When creating variable numbers of controls at run-time, I generally give them an ID of NULL. However, if I wish to sub-class these controls, then they need to have an ID. Is there any way to generate a unique ID at runtime?
ASKER CERTIFIED SOLUTION
Avatar of Answers2000
Answers2000

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of murrayc
murrayc

ASKER

b) Is the kind of thing I'm looking for, but what range of IDs will be acceptable?
Anything you're not using.

Lookup at the values in resource.h

I suggest you pick a very high value, then it's easy to ensure the resource.h always uses values less than that