When the window is moved, resized, obstructed by another window, etc... windows will send your application a WM_PAINT message in order for you to redraw the invalid region.
// hdc = BeginPaint(hwnd, &paintstruct);
For a test, I commented the lines of code out to see what would happen. When I ran my simple program (It just displays a blank window.), I could still resize, move, etc.. and it still redrew the window. Why is this? Does windows do something I'm not aware of? Please help!