   Should I implement Event Handling  and use Inheritance?
  I have created my own GUI, it has windows, buttons, textboxes.I have three classes, CWindow, CButton and CTextbox. I haven't used inheritance so these classes each have similar variables and functions, eg name, update as oposed to inheritance having name in the base class and dreived classes not having name, but using name.I was wondering if my code would suffer performance wise or just be worse for code maintenance because of the lack of inheritance.I was also wondering about the way I have coded my GUI. I have seen alot of people using event handling systems, etc. I am just looping through a DrawGUI function.eg I'm doing this://psuedo codevoid CGUI::DrawGUI(void){update mouse //update mouse class based on mousemove events and mouse    //click events in the windows proc functiondraw mouse //adds rect to list to be drawn laterloop through 'visible' Windowsupdate //check for mouse pos/click interactiondraw //adds rect to list to be drawn laterloop through Items //each cell in the grid in windowloop through buttonsupdate //check for mouse pos/click interactiondraw //adds rect to list to be drawn laterloop through textboxesupdate //check for mouse pos/click interactiondraw //adds rect & text to list to be drawn latersort sprites //a class that stores the rect, z, texture and text to be drawndraw all //windows, buttons, etc using D3DXSprite}//When I test for a button click or something, I just have a IsButtonClicked() function//A binary search is done to get to the button and return if it was clicked.//In the game loop an if statement can be used and any action can be put within.Does event handling offer better performance or less code maintenance? Any suggestions?   
  Well, for your GUI, might want to use inheritance. It might decrease preformance some due to the polymorphism, but it'll be easier to maintain.And plus, when you implement the inheritance, you won't have to register buttons, textboxes and such to their own list, you con simply have them go to a list of pointers to that common base. Then you can execute the basic functions from there.   