I sub-classed a rich edit control and I’ve found it has caused the border of the control to stop being repainted, though the client area still repaints normally. It therefore comes out looking like this, where the green area is the client area and the mess is the border after dragging a window over it:

http://img2.uploadimages.net/360421border.jpg

The subclassed window procedure processes a few message (WM_GETDLGCODE , WM_CHAR and WM_KEYDOWN) in the switch case and has a default case of:

return CallWindowProc(g_pOldCommandEditProc, hEditWnd, mMsg, wParam, lParam);

I thought the default rich edit control window procedure would handle the redrawing of the border but that isn’t happening.

I’m new to windows programming and really don’t know what to do. I’ve tried a variety of things like calling ReddrawWindow() with RDW_FRAME from WM_PAINT but nothing worked.

Can anyone possibly direct me to where the problem might be?

Thanks for any help you can offer.