I think you might have to pass the handle to the main window, and in wParam pass the handle to the button.
entropysink.com -- because arses weren't designed for running websites.