C++/(MFC)워커 스레드와 이벤트를 이용한 동기화 Edit Diff Refresh Backlink Random Search History Help Setting Hide Show CEvent g_eventStart; CEvent g_eventKill; ... UINT ThreadProc(LPVOID pParam) { ::WaitForSingleObject(g_eventStart.m_hObject, INFINITE); CWnd* pWnd = CWnd::FromHandle((HWND)pParam); // Working Loop DWORD startTime = timeGetTime(); while (working) { working = finder.FindNextFileW(); if (!(finder.IsDots() || finder.IsCompressed() || finder.IsSystem() || finder.IsTemporary())) { ... } if (::WaitForSingleObject(g_eventKill.m_hObject, 0) == WAIT_OBJECT_0) return; } } DWORD elapsedTime = timeGetTime(); // End Work ::PostMessage((HWND)pParam, WM_THEMECHANGED, 0, 0); return 0; } MFC 동기화 스레드 이벤트 이 글에는 0 개의 댓글이 있습니다. Please enable JavaScript to view the comments powered by Disqus. comments powered by Disqus