Perhaps read the next line
The DWL_MSGRESULT value set by the SetWindowLong function is ignored.
Want to guess whats in the DWL_MSGRESULT that is now going to be ignored when you return false????
Yes the default handler gets called but there is no valid brush.
I have no idea what microsoft's intention was with this but the simple solution from where you are is to simply call the default handler yourself manually while DWL_MSGRESULT is still valid.
It has been like that for a very very long time, perhaps it's a bug or oversight I just know it works.
Realistically for commercial products most of us subclass the standard edit box for types of entries with the edit boxes handling there own validation, tabbing etc. It means far more reusable code and much less playing around with dialog handlers in many cases you can just use the standard dialog handler.