Well, on the surface, there doesn't seem to be a whole lot wrong with your code. However:
1) Read (or re-read)
GetMessage function (Windows) - specifically where it says, "avoid code like this" (hint: you have code "like this").
2) Kill off the WM_PAINT case - it doesn't do anything.
3) Add a case for the WM_INITDIALOG message in your Dialog Box handler, and transfer your ShowWindow() and UpdateWindow() calls to it.
Last but not least, handling a GetMessage loop is a tricky thing. The GetMessage() function can return -1 on error - your code doesn't handle that. Also, msg.hwnd can be NULL, which your code also doesn't handle.
It looks like a lot of the code that you've shown comes directly from examples that are provided online by Microsoft - well, that doesn't mean that the code actually works - I'll just leave it at that.
Of course, these are just suggestions. There might be something else going on that I couldn't possibly know about..