It tried that but it does not paint anything on the richedit box

It also gives me an access voilation error message when I try to set its procedure to default at the WM_CLOSE message