This is an interesting thing (what i never thought of yet...) and I wonder how you people think it will happen.
We normally won't sendmessage to ourself, but what if we do that?
Here are the sample example:
Because SendMessage is a synchronous function, so THEORETICALLY it will casue an infinite loop!Code:LRESULT CDlgExeDlg::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) { // TODO: Add your specialized code here and/or call the base class switch (message) { case WM_MYTEST: { if (! SendMessage(WM_MYTEST)) { ASSERT(0); }; int i = 0; } .....
But is this true?
How do you people think?




Reply With Quote