Support for panning and zooming
Handle all queued events before drawing the next frame
Move pen functionality to a separate class
Add a simple color chooser
Rewrite window in C++
Replace window_proc with an abstract control class
Support for scrolling the colors with the mouse wheel
Highlight the selected color
Add a simple popup menu
Move mouse hit test into each widget

This is a simple way to delivering mouse up events to widgets where
the mouse has been dragged outside the widget.
Highlight menu items if the mouse moves back again
Detatch the menu after a mouse up event