Hi everyone:
I seem to be stumped by the simplest -- I have a Win32 program and I need to display a message box centered by the parent window. Here's the example:
Well, the problem is that it is centered in the middle of the screen and it's position has nothing to do with the parent window. I stepped through the entire AfxMessageBox() in MFC, which by the way places it's message box in the middle of a parent window, and found absolutely nothing.
Can someone tell me what am I doing wrong?
I seem to be stumped by the simplest -- I have a Win32 program and I need to display a message box centered by the parent window. Here's the example:
Code:
MessageBox(hParentWnd, "Message to display", "Program Name", MB_ICONERROR | MB_OK);
Well, the problem is that it is centered in the middle of the screen and it's position has nothing to do with the parent window. I stepped through the entire AfxMessageBox() in MFC, which by the way places it's message box in the middle of a parent window, and found absolutely nothing.
Can someone tell me what am I doing wrong?