.NET Message box is destroying a window made in C++.

G

Guest

We have a bit of a situation where Windows.Forms.MessageBox is somehow causing a specific window created in native C++ to get an NC_DESTROY message. The windows share a common great-grandparent and I believe are on the same thread. The window being destroyed is a modeless window that is a grandchild of the parent window passed into the messagebox. Here is the middle of the call stack. Somehow it is getting the ParkingWindow (whatever the heck that is) and the C++ modeless child window confused. Any suggesstions would be appreciated. Thanks
XWRAP70.DLL!XWDlgCallBackProc(HWND__ * hWnd=0x002907b6, unsigned int msg=130, unsigned int param1=0, long param2=0) Line 345 + 0x16 C+
user32.dll!77d67ad7()
user32.dll!77d6cc6e()
user32.dll!77d445bd()
user32.dll!77d70b4d()
NTDLL.DLL!77fb4da6()
00eba7b9()
system.windows.forms.dll!System.Windows.Forms.UnsafeNativeMethods.DestroyWindow(System.Runtime.InteropServices.HandleRef hWnd = {System.Runtime.InteropServices.HandleRef}) + 0x10 bytes
system.windows.forms.dll!System.Windows.Forms.NativeWindow.DestroyHandle() + 0x79 bytes
system.windows.forms.dll!System.Windows.Forms.Control.DestroyHandle() + 0x2c7 bytes
system.windows.forms.dll!System.Windows.Forms.Application.ParkingWindow.Destroy() + 0xd bytes
system.windows.forms.dll!ThreadContext.DisposeParkingWindow() + 0x86 bytes
system.windows.forms.dll!ThreadContext.EndModalMessageLoop() + 0x46 bytes
system.windows.forms.dll!System.Windows.Forms.Application.EndModalMessageLoop() + 0x13 bytes
system.windows.forms.dll!System.Windows.Forms.MessageBox.ShowCore(System.Windows.Forms.IWin32Window owner = {Xactware.Core.UI.WrapperIWin32Window}, string text = "Creating a supplement estimate will allow you to add new line item entries to your estimate and create an additional supplement report in Payment Tracker. You will not be able to edit prior ACV/Supplement settlements. Do you intend to create a new supplement estimate?", string caption = "Supplemental Estimate", System.Windows.Forms.MessageBoxButtons buttons = YesNo, System.Windows.Forms.MessageBoxIcon icon = Question, System.Windows.Forms.MessageBoxDefaultButton defaultButton = Button2, System.Windows.Forms.MessageBoxOptions options = 0) + 0x2d7 bytes
system.windows.forms.dll!System.Windows.Forms.MessageBox.Show(System.Windows.Forms.IWin32Window owner = {Xactware.Core.UI.WrapperIWin32Window}, string text = "Creating a supplement estimate will allow you to add new line item entries to your estimate and create an additional supplement report in Payment Tracker. You will not be able to edit prior ACV/Supplement settlements. Do you intend to create a new supplement estimate?", string caption = "Supplemental Estimate", System.Windows.Forms.MessageBoxButtons buttons = YesNo, System.Windows.Forms.MessageBoxIcon icon = Question, System.Windows.Forms.MessageBoxDefaultButton defaultButton = Button2) + 0x23 bytes
 
S

sytelus

We had similar problem with Xceed Grid. When MessageBox.Show finishes,
it was distroying combobox in focus before message box appeared. The
solution was to make sure the combo box had its .Parent property set
correctly. If no parent is set, the default parent would be desktop
which causes this problem.
 
Top