c++ - How to force AfxMessageBox to center on mainframe and not whatever child window that currently has focus -


i'm developing mdi application, primary document maximized in mdi frame. create non-modal dialog pop-up display secondary information user while work in main window. however, when user moves pop-up takes focus expected. problem occurs when window has focus , event generates afxmessagebox occurs in mainframe. expect afxmessagebox pop-up centered on mainframe. currently, pops centered on non-modal dialog pop-up window which, chance, had focus @ time.

is there way force afxmessagebox pop-up centered on mainframe? or @ least force pop-up centered on window in called. example, if in non-modal dialog error occurs, want afxmessagebox appear centered on dialog because it's intuitive error occurred there. alternatively, if i'm working non-modal dialog , error occurs in mainframe or document afxmessagebox appear centered on it's view/frame despite fact i'm working child window.

i hope that's clear enough.

use cwnd::messagebox() method instead.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -