To lvramanan:

You're right, it's not needed if the programs about to exit anyway, but it's good coding practice to put the window proc back when you're done. Plus, if you do that in the VB IDE it crashes VB (since your program at that point is still part of VB, so the program's window proc is run through VB's proc...if VB loses it's proc, it shuts down hard).