I have a scenario where the size and position of a warning dialog is inconsistent depending on what is done with a modeless dialog that produces it. I have a modeless dialog that has a combo box that fires a kill focus event. If I tab out of the combo box the warning pops as expected centered over the parent modeless dialog centered both horizontally and vertically.
If I highlight the combo box, then click and drag the modeless dialog by its caption bar the kill focus fires as expected. However, the popup warning is now half the size and off to the left of the modeless dialog that produced it. It appears to be centered on the Windows desktop instead of my application dialog.
I have tried it as MessageBox, AfxMessageBox, and as a custom dialog we use for warnings and errors (Just a MessageBox with some custom bells and whistles). All produce the same weird positioning behavior.
Is this a quirk with MFC or Windows?
Is there any way for me to obtain a handle to a pop up dialog, such as AfxMessageBox and position it myself?
Is there some simple reason/solution I am just not seeing?
The app is written in VC++ 6. This is just an annoyance and does not effect the functionality of the app, it is just bugging me, help.
Thanks,
Troy
If I highlight the combo box, then click and drag the modeless dialog by its caption bar the kill focus fires as expected. However, the popup warning is now half the size and off to the left of the modeless dialog that produced it. It appears to be centered on the Windows desktop instead of my application dialog.
I have tried it as MessageBox, AfxMessageBox, and as a custom dialog we use for warnings and errors (Just a MessageBox with some custom bells and whistles). All produce the same weird positioning behavior.
Is this a quirk with MFC or Windows?
Is there any way for me to obtain a handle to a pop up dialog, such as AfxMessageBox and position it myself?
Is there some simple reason/solution I am just not seeing?
The app is written in VC++ 6. This is just an annoyance and does not effect the functionality of the app, it is just bugging me, help.
Thanks,
Troy