Just to muddy the waters a bit ... many people define frameworks to have some special properties around "inversion of control". For example, when we switched from writing procedural C code to event driven
Java code we gave up control during all the times the user is moving the mouse, typing in edit boxes, etc. The Swing framework calls us when events like button clicks happen. Frameworks tend to provide the basic structure of processing and call application code when they need information or think you deserve a chance to run a few lines of code. In contrast, "libraries" tend to deliver functional bits you can call without taking control from you. Hope that's useful.