How do I build a display dynamically ?

I'm building an application which requires the display to be created
dynamically when the programs starts. When it starts it will read some
sort of .INI file and from this ascertain how many objects to display
and their size, position and other properties. The idea is to allow
changes to the display without the need for source code changes.

I think I'm beginning to see how to create the objects dynamically
(although any advice would be appreciated), but how do I assign code
to these objects so that they have associated events when someone, for
example, clicks on a button. How can I write code to react to an event
when I don't know what the object is even going to be called that is
creating the event ?

Any help much appreciated.