After a "dummy" app. has been created(buttons menus, dialogs,etc...) how do I begin creating processes for these controls to actually do something?

Or when the user resizes the window, let's say I want the app to do several things following this event,etc...

And are "clean-up" procedures usually necassary for these operations?

Generalizations are O.K.