OSError: [WinError -1073741795] Windows Error 0xc000001d [Windows API and Python]

0

I am working on an app and making it by using Windows API and Python. I already have a main window, but now I want a dialog box. I have tried functions like CreateDialog and CreateDialogIndirectParamA to make a dialog box, but that did not work. Now, I am trying to make a second window just like I made the main window. The second window is created, but is destroyed immediately and that error is throw. This is the error message: DispatchMessageA(lpmsg) OSError: [WinError -1073741795] Windows Error 0xc000001d . I have no clue what is causing the error or what it means. Please help me. I need it to work for a school project. Thank you!

The main.py and user32.py are two different files, please make different files if you want to replicate my code. (The website doesn’t allow me to post more than two links)

You will need three files to make the app

main.py and user32.py: main.py · GitHub

button.py: button.py · GitHub