Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我MessageBox在 C++ 中使用,使用winuser.h头文件。
MessageBox
winuser.h
当我运行应用程序时,消息框不显示,程序在该行终止。
我的代码:
HWND hDlg=NULL; MessageBox (hDlg, TEXT ("Check the UserName and Password is Correct"), TEXT ("Windows Logon"), MB_ICONINFORMATION);
注意:我也在使用winwlx.h. 这会导致问题吗?我应该如何安排头文件?
winwlx.h
在正常情况下,MessageBox()不会使应用程序崩溃。您显示的代码没有将任何错误值传递给MessageBox(),因此它可能崩溃的唯一方法是如果您的应用程序的内存被其他代码严重损坏,或者安装了行为不端的外部消息/对话框挂钩。
MessageBox()