4) Please tell me if you see things that are bad in the attached code, so that I'll fix it before submitting a patch.
I think you probably want to pass a valid HINSTANCE to DialogBox, to do this you should start your program with WinMain() instead of main().
Ivan.