I am having dialog box application in MFC. To refresh view on dialog box we are using WM_NCPAINT, it does call OnNCPaint, but sometimes view is not getting refreshed. Behaviour is not always reproducible. Same behaviour is happening with WM_PAINT also.
When we use SendMessage(WM_SIZE), behaviour is not reproducible, and working as expected.
Before checking in the code, I wanted to make sure, should I use WM_SIZE instead of WM_NCPAINT or WM_PAINT, because it is working fine with it.