I have a Windows SDK program that runs an extensive WM_PAINT routine to generate the window contents. I would like to be able to use MessageBox to display an error while drawing the window, but it seems that the act of putting up the MessageBox causes another WM_PAINT message to be issued, which encounters the error again, which tries to put up a MesssageBox, etc, etc until the stack overflows.
I can understand why a WM_PAINT may get generated when the Message Box is torn down, but why when it is put up? Since I can't find a similar problem reported I'd assume I'm doing something wrong.
I can understand why a WM_PAINT may get generated when the Message Box is torn down, but why when it is put up? Since I can't find a similar problem reported I'd assume I'm doing something wrong.