MessageBox AlwaysOnTop
-
Hi!
Ich suce eine Möglichkeit meine Fehlermeldungen AlwaysOnTop anzuzeigen.
Kann mir bitte jemand sagen an welcher Stelle man das in diesem Befehle einbaut?MessageBox(NULL, "An unknown error occured!", _T("Error"), 0x00 | MB_ICONERROR);Vielen Dank!
pAT
-
Dieser Thread wurde von Moderator/in Jochen Kalmbach aus dem Forum C++/CLI mit .NET in das Forum WinAPI verschoben.
Im Zweifelsfall bitte auch folgende Hinweise beachten:
C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?Dieses Posting wurde automatisch erzeugt.
-
Hast Du mal gelesen was zu MB_SYSTEMMODAL, MB_APPLMODAL, MB_TASKMODAL in der MSDN steht.
Message-Box Modality
MB_APPLMODAL The user must respond to the message box before continuing work in the current window. However, the user can move to the windows of other applications and work in those windows. The default is MB_APPLMODAL if neither MB_SYSTEMMODAL nor MB_TASKMODAL is specified.
MB_SYSTEMMODAL All applications are suspended until the user responds to the message box. System-modal message boxes are used to notify the user of serious, potentially damaging errors that require immediate attention and should be used sparingly.
MB_TASKMODAL Similar to MB_APPLMODAL, but not useful within a Microsoft Foundation class application. This flag is reserved for a calling application or library that does not have a window handle available.
-
Es reicht, wenn du ein Handle angibst, dann ist sie zu mindest schon mal modal zu deinem Fenster.
-
Luckie schrieb:
Es reicht, wenn du ein Handle angibst, dann ist sie zu mindest schon mal modal zu deinem Fenster.
Die Message wird leider von einem Thread aufgerufen. Das Hauptprogramm läuft da unbeeindruckt weiter.
MB_SYSTEMMODAL funktioniert super, vielen Dank:
MessageBox(NULL, "An unknown error occured!", _T("Error"), 0x00 | MB_ICONERROR | MB_SYSTEMMODAL);Vielen Dank für eure Aufmerksamkeit!
gruß!
pAT