I have a relatively simple Window class. I created a window related to thisetc. Etc. Now I have created an exception indicating a problem. When I call MessageBoxto display an error message, the program crashes because it tries to call my Window Proc. Now, I mean, admittedly, I failed with SRP here, and just writing a short self-locking HWND class will solve this problem, since the window was not cleaned properly. However, I am really puzzled by why he is trying to process Window messages in my call MessageBox- the owner parameter nullptr. Any suggestions?
Edit: if I call correctly DestroyWindow, now the message box just does not appear, although the application does not crash. It only works if I manually delete thisfrom the window, so if the call were called, it switched to DefWindowProcand then DestroyWindow. I mean, I thought that if you call MessageBoxwithout an owner, then it will work, regardless of what you did with other windows in the system.
Puppy source
share