If you ever try to paint on the surface of a window created with CreateDialog or CreateDialogIndirect, you'll notice that it's not what you expect. Need an explanation (or link to one) of the internal details of the dialog painting mechanism as opposed to that of other windows. Preferential credit to an explanation of how to circumvent any limitations.