[英]Display popup in Win32 Console Application
如何在Microsoft Visual C ++中的Win32控制台應用程序中顯示彈出窗口? 這是用於使用OpenCv構建睡意檢測系統。
MessageBox( nullptr, TEXT( "The driver is sleeping!!" ), TEXT( "Message" ), MB_OK );
確保包含windows.h。 你調用它的線程將阻止。
你可以打電話給: -
MessageBoxA(NULL, "Wake Up!", "Alert!", MB_OK | MB_ICONEXCLAMATION);
你必須包含這個才能工作。
這些APIS仍可通過控制台應用程序運行。
#include <windows.h>
int main() {
MessageBox(NULL, L"The message", L"The caption", MB_OK);
return 0;
}
記得要鏈接user32.lib
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.