这篇教程C++ GetMessageW函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetMessageW函数的典型用法代码示例。如果您正苦于以下问题:C++ GetMessageW函数的具体用法?C++ GetMessageW怎么用?C++ GetMessageW使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetMessageW函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: wWinMainint APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow){ MSG msg; /* Other instances of app running? */ if (!hPrevInstance) { /* stuff to be done once */ if (!InitApplication(hInstance)) { return FALSE; /* exit */ } } /* stuff to be done every time */ if (!InitInstance(hInstance, nCmdShow)) { return FALSE; } HandleCommandLine(lpCmdLine); /* Main loop */ /* Acquire and dispatch messages until a WM_QUIT message is received */ while (GetMessageW(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessageW(&msg); } return msg.wParam;}
开发者ID:AlexSteel,项目名称:wine,代码行数:32,
示例2: MessageLoopstatic DWORD WINAPI MessageLoop(LPVOID lpParameter){ VideoRendererImpl* This = lpParameter; MSG msg; BOOL fGotMessage; TRACE("Starting message loop/n"); if (FAILED(BaseWindowImpl_PrepareWindow(&This->baseControlWindow.baseWindow))) { This->ThreadResult = FALSE; SetEvent(This->hEvent); return 0; } This->ThreadResult = TRUE; SetEvent(This->hEvent); while ((fGotMessage = GetMessageW(&msg, NULL, 0, 0)) != 0 && fGotMessage != -1) { TranslateMessage(&msg); DispatchMessageW(&msg); } TRACE("End of message loop/n"); return msg.wParam;}
开发者ID:lucianolorenti,项目名称:wine,代码行数:28,
示例3: threadRenderLoopint Engine_Win::run(){ m_bRunning = true; std::thread threadRenderLoop( &Engine_Win::renderLoop, this ); std::thread threadLogicLoop( &Engine_Win::logicLoop, this ); // message loop BOOL bRet; MSG msg; while ( ( bRet = GetMessageW( &msg, nullptr, 0, 0 ) ) != 0 ) { if ( bRet == -1 ) { //Dafuq? I quit! quit(); } else { TranslateMessage( &msg ); DispatchMessageW( &msg ); } std::this_thread::sleep_for( std::chrono::milliseconds( 4 ) ); } m_bRunning = false; threadRenderLoop.join(); threadLogicLoop.join(); return 0;}
开发者ID:Svensational,项目名称:mIon,代码行数:30,
示例4: SCROLL_TrackScrollBarstatic void SCROLL_TrackScrollBar( HWND hwnd, INT scrollbar, POINT pt ){ MSG msg; ScreenToWindow(hwnd, &pt); SCROLL_HandleScrollEvent( hwnd, scrollbar, WM_LBUTTONDOWN, pt ); do { if (!GetMessageW( &msg, 0, 0, 0 )) break; if (CallMsgFilterW( &msg, MSGF_SCROLLBAR )) continue; if (msg.message == WM_LBUTTONUP || msg.message == WM_MOUSEMOVE || (msg.message == WM_SYSTIMER && msg.wParam == SCROLL_TIMER)) { pt.x = GET_X_LPARAM(msg.lParam); pt.y = GET_Y_LPARAM(msg.lParam); ClientToScreen(hwnd, &pt); ScreenToWindow(hwnd, &pt); SCROLL_HandleScrollEvent( hwnd, scrollbar, msg.message, pt ); } else { TranslateMessage( &msg ); DispatchMessageW( &msg ); } if (!IsWindow( hwnd )) { ReleaseCapture(); break; } } while (msg.message != WM_LBUTTONUP && GetCapture() == hwnd);}
开发者ID:darkvaderXD2014,项目名称:reactos,代码行数:35,
示例5: PostMessageWvoid RInput::deinitialise(){ if(false == RInput::_initialised){ return; } RInput::_initialised = false; if(0 == PostMessageW(RInput::_hwnd_message, WM_DESTROY, 0, 0)){ std::cerr << "RInput::deinitialise(): 0 == PostMessageW(RInput::_hwnd_message, WM_DESTROY, 0, 0), GetLastError():" << std::dec << GetLastError() << std::endl; } MSG msg; while(GetMessageW(&msg, RInput::_hwnd_message, 0, 0)){ TranslateMessage(&msg); DispatchMessageW(&msg); } if(0 == DestroyWindow(RInput::_hwnd_message)){ std::cerr << "RInput::deinitialise(): 0 == DestroyWindow(RInput::_hwnd_message), GetLastError(): " << std::dec << GetLastError() << std::endl; return; } RInput::_rinput_instance = std::shared_ptr<RInput>(nullptr); RInput::_initialised = false; RInput::_hwnd_message = 0;}
开发者ID:4D4B,项目名称:RInput,代码行数:26,
示例6: mainint main(int argc, char *argv[]){ WNDCLASSW wc; MSG msg; ZeroMemory(&wc, sizeof (WNDCLASSW)); wc.lpszClassName = L"mainwin"; wc.lpfnWndProc = wndProc; wc.hInstance = GetModuleHandle(NULL); wc.hIcon = LoadIconW(NULL, IDI_APPLICATION); wc.hCursor = LoadCursorW(NULL, IDC_ARROW); wc.hbrBackground = (HBRUSH) (COLOR_BTNFACE + 1); RegisterClassW(&wc); mainwin = CreateWindowExW(0, L"mainwin", L"mainwin", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 400, 400, NULL, NULL, GetModuleHandle(NULL), NULL); if (argc > 1) dialog = CreateWindowExW(WS_EX_CONTROLPARENT, WC_DIALOG, L"", WS_CHILD | WS_VISIBLE, 100, 100, 200, 200, mainwin, NULL, GetModuleHandle(NULL), NULL); else { const BYTE dlgtemplate[] = { 0x01, 0x00, // version 0xFF, 0xFF, // signature 0x00, 0x00, 0x00, 0x00, // help 0x00, 0x00, 0x01, 0x00, // WS_EX_CONTROLPARENT 0x00, 0x00, 0x00, 0x50, // WS_CHILD | WS_VISIBLE 0x00, 0x00, // no controls 100, 0, // X/Y/Width/Height 100, 0, 100, 0, 100, 0, 0x00, 0x00, // menu 0x00, 0x00, // class 0x00, 0x00, // title 0x00, 0x00, 0x00, 0x00, // some padding 0x00, 0x00, 0x00, 0x00, // more padding 0x00, 0x00, 0x00, 0x00, // just to be safe }; dialog = CreateDialogIndirectW(GetModuleHandle(NULL), (LPCDLGTEMPLATEW) dlgtemplate, mainwin, dlgproc); } printf("%I32X/n", EnableThemeDialogTexture(dialog, ETDT_ENABLE | ETDT_USETABTEXTURE | ETDT_ENABLETAB)); ShowWindow(mainwin, SW_SHOWDEFAULT); UpdateWindow(mainwin); while (GetMessageW(&msg, NULL, 0, 0) > 0) { TranslateMessage(&msg); DispatchMessage(&msg); } return 0;}
开发者ID:andlabs,项目名称:misctestprogs,代码行数:60,
示例7: CreateWndThreadW/** * /brief Thread that create window and that monitor event related to it. * /param pThreadParam thread parameter * /return 0 */static unsigned WINAPI CreateWndThreadW(LPVOID pThreadParam){ HINSTANCE hInstance = GetModuleHandle(NULL); keyboard_hook* keyboard = (keyboard_hook*)pThreadParam; RegisterWindowClassW(hInstance); HWND hWnd = CreateWindowW(WINDOW_SHORTCUT_NAME, NULL, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL); keyboard->hook = SetWindowsHookEx(WH_KEYBOARD_LL, keyHandler, NULL, 0); if(hWnd == NULL) { fprintf(stderr, "Failed to create window: %d/n", GetLastError()); fflush(stderr); return 0; } else { MSG msg; keyboard->hwnd = hWnd; PostMessage(keyboard->hwnd, WM_HOTKEY, 0, 0); while(GetMessageW(&msg, hWnd, 0, 0)) { TranslateMessage(&msg); DispatchMessageW(&msg); } return msg.wParam; }}
开发者ID:Darkeye9,项目名称:jitsi,代码行数:38,
示例8: CreateView/// <summary>/// Creates the main window and begins processing/// </summary>int CMainWindow::Run(){ // Create main application window CreateView(); // Show the main window ShowView(); // Show the kinect windows ShowAllKinectWindows(); // Main message loop MSG msg = {0}; while (WM_QUIT != msg.message) { if (GetMessageW(&msg, nullptr, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return static_cast<int>(msg.wParam);}
开发者ID:dcastro9,项目名称:emory_kinect_project,代码行数:28,
示例9: WinMainint APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){ // TODO: Place code here. MSG msg; //CoInitialize(0); // for Shell Icons // Initialize global strings htmlayout::window::register_class(hInstance); // Perform application initialization: if (!InitInstance(hInstance, nCmdShow)) { return FALSE; } // Main message loop: while (GetMessageW(&msg, NULL, 0, 0)) { // execute asynchronous tasks in GUI thread. htmlayout::queue::execute(); TranslateMessage(&msg); DispatchMessageW(&msg); } return msg.wParam;}
开发者ID:XiaoFan1519,项目名称:ColorHelper,代码行数:32,
示例10: CreateEventW/// <summary>/// Window message loop/// </summary>/// <returns>wParam of last received message</returns>WPARAM KinectWindow::MessageLoop(){ m_hStopStreamEventThread = CreateEventW(nullptr, TRUE, FALSE, nullptr); HANDLE hEventThread = CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)StreamEventThread, this, 0, nullptr); MSG msg = {0}; BOOL ret; while (0 != (ret = GetMessageW(&msg, nullptr, 0, 0))) { if (-1 == ret) { break; } if (IsDialogMessageW(m_hWnd, &msg)) { continue; } TranslateMessage(&msg); DispatchMessageW(&msg); } WaitForSingleObject(hEventThread, INFINITE); CloseHandle(hEventThread); return msg.wParam;}
开发者ID:rikvdbrule,项目名称:KinectRecording,代码行数:33,
示例11: WinMainint APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow){ MSG msg; HANDLE hAccelTable; if(!hPrevInst) { if(!InitApplication(hInst)) return FALSE; } if(!InitInstance(hInst, nCmdShow)) return FALSE; hAccelTable = LoadAcceleratorsW(hInst, MAKEINTRESOURCEW(IDA_OLEVIEW)); while(GetMessageW(&msg, NULL, 0, 0)) { if(TranslateAcceleratorW(globals.hMainWnd, hAccelTable, &msg)) continue; TranslateMessage(&msg); DispatchMessageW(&msg); } return msg.wParam;}
开发者ID:Sunmonds,项目名称:wine,代码行数:26,
示例12: CreateWndThreadWunsigned WINAPI CreateWndThreadW( LPVOID pThreadParam) { HWND hWnd = CreateWindowW( L"Azureus Window Hook", NULL, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL); if( hWnd == NULL){ printf( "Failed to create window/n" ); return( 0 ); }else{ MSG Msg; while(GetMessageW(&Msg, hWnd, 0, 0)) { TranslateMessage(&Msg); DispatchMessageW(&Msg); } return Msg.wParam; }}
开发者ID:cnh,项目名称:BitMate,代码行数:27,
示例13: TuiConsoleThreadstatic DWORD WINAPITuiConsoleThread(PVOID Data){ PTUI_CONSOLE_DATA TuiData = (PTUI_CONSOLE_DATA)Data; PCONSOLE Console = TuiData->Console; HWND NewWindow; MSG msg; NewWindow = CreateWindowW(TUI_CONSOLE_WINDOW_CLASS, Console->Title.Buffer, 0, -32000, -32000, 0, 0, NULL, NULL, ConSrvDllInstance, (PVOID)Console); if (NULL == NewWindow) { DPRINT1("CONSRV: Unable to create console window/n"); return 1; } TuiData->hWindow = NewWindow; SetForegroundWindow(TuiData->hWindow); NtUserConsoleControl(ConsoleAcquireDisplayOwnership, NULL, 0); while (GetMessageW(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessageW(&msg); } return 0;}
开发者ID:CSRedRat,项目名称:reactos-playground,代码行数:33,
示例14: mainint main(void){ HWND mainwin; MSG msg; INITCOMMONCONTROLSEX icc; ZeroMemory(&icc, sizeof (INITCOMMONCONTROLSEX)); icc.dwSize = sizeof (INITCOMMONCONTROLSEX); icc.dwICC = ICC_LISTVIEW_CLASSES; if (InitCommonControlsEx(&icc) == 0) abort(); makeTableWindowClass(); mainwin = CreateWindowExW(0, tableWindowClass, L"Main Window", WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL, CW_USEDEFAULT, CW_USEDEFAULT, 400, 400, NULL, NULL, GetModuleHandle(NULL), NULL); if (mainwin == NULL) abort(); SendMessageW(mainwin, tableAddColumn, tableColumnText, (LPARAM) L"Column"); SendMessageW(mainwin, tableAddColumn, tableColumnImage, (LPARAM) L"Column 2"); SendMessageW(mainwin, tableAddColumn, tableColumnCheckbox, (LPARAM) L"Column 3"); ShowWindow(mainwin, SW_SHOWDEFAULT); if (UpdateWindow(mainwin) == 0) abort(); while (GetMessageW(&msg, NULL, 0, 0) > 0) { TranslateMessage(&msg); DispatchMessageW(&msg); } return 0;}
开发者ID:yhcflyy,项目名称:ui,代码行数:32,
示例15: WinMainint WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)#endif{ // // FIXME: Resource loader owner must be Application class // or something like this. Instanize resourse loader here // is not good way. // ResourceLoader resourceLoader(hInstance); VncViewerConfig config; // The state of the application as a whole is contained in the one app object #ifdef _WIN32_WCE VNCviewerApp app(hInstance, szCmdLine); #else VNCviewerApp32 app(hInstance, szCmdLine); #endif // Start a new connection if specified on command line, // or if not in listening mode if (app.m_options.m_connectionSpecified) { app.NewConnection(app.m_options.m_host, app.m_options.m_port); } else if (!app.m_options.m_listening) { // This one will also read from config file if specified app.NewConnection(); } MSG msg; std::list<HWND>::iterator iter; try { while (GetMessageW(&msg, NULL, 0, 0)) { if ( !hotkeys.TranslateAccel(&msg) && !help.TranslateMsg(&msg) && !app.ProcessDialogMessage(&msg) ) { TranslateMessage(&msg); DispatchMessage(&msg); } } } catch (WarningException &e) { e.Report(); } catch (QuietException &e) { e.Report(); } // Clean up winsock WSACleanup(); Log::warning(_T("Exiting/n")); return msg.wParam;}
开发者ID:kaseya,项目名称:tightvnc2,代码行数:54,
示例16: wWinMainint APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow){ MSG msg; HACCEL hAccel; UNREFERENCED_PARAMETER(hPrevInstance); if (ProcessCmdLine(lpCmdLine)) { return 0; } /* Initialize global strings */ LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); LoadStringW(hInstance, IDC_REGEDIT_FRAME, szFrameClass, MAX_LOADSTRING); LoadStringW(hInstance, IDC_REGEDIT, szChildClass, MAX_LOADSTRING); switch (GetUserDefaultUILanguage()) { case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT): SetProcessDefaultLayout(LAYOUT_RTL); break; default: break; } /* Store instance handle in our global variable */ hInst = hInstance; /* Perform application initialization */ if (!InitInstance(hInstance, nCmdShow)) { return 0; } hAccel = LoadAcceleratorsW(hInstance, MAKEINTRESOURCEW(ID_ACCEL)); /* Main message loop */ while (GetMessageW(&msg, NULL, 0, 0)) { if (!TranslateAcceleratorW(hFrameWnd, hAccel, &msg) && !TranslateChildTabMessage(&msg)) { TranslateMessage(&msg); DispatchMessageW(&msg); } } ExitInstance(hInstance); return (int)msg.wParam;}
开发者ID:RareHare,项目名称:reactos,代码行数:54,
示例17: whilevoid CEditToolApp::OnSysMsg(void){ MSG msg; while( PeekMessageW( &msg, NULL, 0, 0, PM_NOREMOVE ) ) { if( !GetMessageW( &msg, NULL, 0, 0 ) ) GenErr( "GetMessage shouldn't return 0." ); TranslateMessage( &msg ); DispatchMessageW( &msg ); }}
开发者ID:LaoZhongGu,项目名称:RushGame,代码行数:12,
示例18: while // Main application message loop WPARAM CApplication::MessageLoop(void) { while (GetMessageW(&msg, NULL, 0, 0)) { if (!TranslateAcceleratorW(msg.hwnd, hAccelTable, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return msg.wParam; }
开发者ID:Erls-Corporation,项目名称:webinaria-source,代码行数:13,
示例19: _power_notification_threadstatic void _power_notification_thread() { // This uses a thread with its own window message pump to get power // notifications. If adb runs from a non-interactive service account, this // might not work (not sure). If that happens to not work, we could use // heavyweight WMI APIs to get power notifications. But for the common case // of a developer's interactive session, a window message pump is more // appropriate. D("Created power notification thread"); adb_thread_setname("Power Notifier"); // Window class names are process specific. static const WCHAR kPowerNotificationWindowClassName[] = L"PowerNotificationWindow"; // Get the HINSTANCE corresponding to the module that _power_window_proc // is in (the main module). const HINSTANCE instance = GetModuleHandleW(nullptr); if (!instance) { // This is such a common API call that this should never fail. LOG(FATAL) << "GetModuleHandleW failed: " << android::base::SystemErrorCodeToString(GetLastError()); } WNDCLASSEXW wndclass; memset(&wndclass, 0, sizeof(wndclass)); wndclass.cbSize = sizeof(wndclass); wndclass.lpfnWndProc = _power_window_proc; wndclass.hInstance = instance; wndclass.lpszClassName = kPowerNotificationWindowClassName; if (!RegisterClassExW(&wndclass)) { LOG(FATAL) << "RegisterClassExW failed: " << android::base::SystemErrorCodeToString(GetLastError()); } if (!CreateWindowExW(WS_EX_NOACTIVATE, kPowerNotificationWindowClassName, L"ADB Power Notification Window", WS_POPUP, 0, 0, 0, 0, nullptr, nullptr, instance, nullptr)) { LOG(FATAL) << "CreateWindowExW failed: " << android::base::SystemErrorCodeToString(GetLastError()); } MSG msg; while (GetMessageW(&msg, nullptr, 0, 0)) { TranslateMessage(&msg); DispatchMessageW(&msg); } // GetMessageW() will return false if a quit message is posted. We don't // do that, but it might be possible for that to occur when logging off or // shutting down. Not a big deal since the whole process will be going away // soon anyway. D("Power notification thread exiting");}
开发者ID:android,项目名称:platform_system_core,代码行数:52,
示例20: SystemActivityNotifications_runMessageLoopunsigned WINAPISystemActivityNotifications_runMessageLoop(LPVOID pv){ MSG msg; HWND hWnd = (HWND) pv; while (GetMessageW(&msg, hWnd, 0, 0)) { TranslateMessage(&msg); DispatchMessageW(&msg); } return msg.wParam;}
开发者ID:LMVUH,项目名称:jitsi-110915,代码行数:13,
示例21: whilebool Engine::UpdateSystemMessage(){ MSG msg; while (PeekMessageW(&msg, NULL, 0, 0, PM_NOREMOVE)) { if (GetMessageW(&msg, NULL, 0, 0) == 0) return false; TranslateMessage( &msg ); DispatchMessageW( &msg ); } return true;}
开发者ID:leandronunescorreia,项目名称:prelight,代码行数:13,
示例22: mainint main(int argc, const char* argv[]){ InitCommonControls(); if (AttachConsole(ATTACH_PARENT_PROCESS)) { freopen("CONOUT$", "wb", stdout); freopen("CONOUT$", "wb", stderr); } uifiber = ConvertThreadToFiber(NULL); assert(uifiber); appfiber = CreateFiber(0, application_cb, NULL); assert(appfiber); realargc = argc; realargv = argv; /* Run the application fiber. This will deschedule when it wants an * event. */ SwitchToFiber(appfiber); /* And now the event loop. */ int oldtimeout = -1; for (;;) { MSG msg; dpy_flushkeys(); if (timeout != oldtimeout) { if (timeout == -1) KillTimer(window, TIMEOUT_TIMER_ID); else SetTimer(window, TIMEOUT_TIMER_ID, timeout*1000, NULL); oldtimeout = timeout; } GetMessageW(&msg, NULL, 0, 0); if (DispatchMessageW(&msg) == 0) TranslateMessage(&msg); } return 0;}
开发者ID:NRauh,项目名称:wordgrinder,代码行数:51,
示例23: WinMainint CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int) { timeBeginPeriod(1); WNDCLASSW wc; ZeroMemory(&wc, sizeof(wc)); wc.lpfnWndProc = WndProc; wc.hInstance = hInstance; wc.hbrBackground = CreateSolidBrush(RGB(0, 0, 0)); wc.hCursor = LoadCursorW(0, MAKEINTRESOURCE(IDC_ARROW)); wc.lpszClassName = L"LatencyTest"; RegisterClassW(&wc); HWND mainWindow = CreateWindowW( L"LatencyTest", L"Input Latency Test", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, hInstance, 0); ShowWindow(mainWindow, SW_SHOW); UpdateWindow(mainWindow); green = CreateSolidBrush(RGB(0, 255, 0)); red = CreateSolidBrush(RGB(255, 0, 0)); timeSetEvent( 16, 0, postSimulate, (DWORD_PTR)mainWindow, TIME_PERIODIC); MSG msg; for (;;) { BOOL b = GetMessageW(&msg, 0, 0, 0); if (b == -1) { return -1; } if (b == 0) { return msg.wParam; } TranslateMessage(&msg); DispatchMessageW(&msg); }}
开发者ID:chadaustin,项目名称:misc,代码行数:50,
示例24: whileINTCMainWindow::Run(){ MSG Msg; /* Pump the message queue */ while (GetMessageW(&Msg, NULL, 0, 0 ) != 0) { TranslateMessage(&Msg); DispatchMessageW(&Msg); } return 0;}
开发者ID:wyrover,项目名称:development,代码行数:14,
示例25: hugsprim_GetMessageW_44static void hugsprim_GetMessageW_44(HugsStackPtr hugs_root){ HsPtr arg1; HsPtr arg2; HsWord32 arg3; HsWord32 arg4; HsInt32 res1; arg1 = hugs->getPtr(); arg2 = hugs->getPtr(); arg3 = hugs->getWord32(); arg4 = hugs->getWord32(); res1 = GetMessageW(arg1, arg2, arg3, arg4); hugs->putInt32(res1); hugs->returnIO(hugs_root,1);}
开发者ID:xpika,项目名称:winhugs,代码行数:15,
示例26: while//--------------------------------------------------------------------------------------// This function is used only briefly in CHT IME handling,// so accelerator isn't processed.DXUTAPI void CDXUTIMEEditBox::PumpMessage(){ MSG msg; while (PeekMessageW(&msg, nullptr, 0, 0, PM_NOREMOVE)) { if (!GetMessageW(&msg, nullptr, 0, 0)) { PostQuitMessage((int)msg.wParam); return; } TranslateMessage(&msg); DispatchMessageA(&msg); }}
开发者ID:MindCodeTech,项目名称:DXUT,代码行数:18,
示例27: WinMain/*cl winmm.lib user32.lib gdi32.lib C01HelloWinW.c /source-charset:utf-8*/int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow){ wchar_t szAppName[] = L"Hello汉字"; HWND hwnd; MSG msg; WNDCLASSW wndclass; wndclass.style = CS_HREDRAW | CS_VREDRAW; wndclass.lpfnWndProc = WndProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 0; wndclass.hInstance = hInstance; wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); wndclass.lpszMenuName = NULL; wndclass.lpszClassName = szAppName; if (!RegisterClassW(&wndclass)) { MessageBoxW(NULL, L"This program requires Windows NT!汉字", szAppName, MB_ICONERROR); return 0; } hwnd = CreateWindowW(szAppName, // window class name "The Hello Program汉字", // window caption WS_OVERLAPPEDWINDOW, // window style CW_USEDEFAULT, // initial x position CW_USEDEFAULT, // initial y position CW_USEDEFAULT, // initial x size CW_USEDEFAULT, // initial y size NULL, // parent window handle NULL, // window menu handle hInstance, // program instance handle NULL); // creation parameters ShowWindow(hwnd, iCmdShow); UpdateWindow(hwnd); while (GetMessageW(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessageW(&msg); } return msg.wParam;}
开发者ID:zhouyang209117,项目名称:CppTutorial,代码行数:51,
示例28: pump_msgsstatic void pump_msgs(BOOL *b){ MSG msg; if(b) { while(!*b && GetMessageW(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessageW(&msg); } }else { while(PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessageW(&msg); } }}
开发者ID:Crobin83,项目名称:wine,代码行数:16,
注:本文中的GetMessageW函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetMeter函数代码示例 C++ GetMessageType函数代码示例 |