diff --git a/gui/TextBuffer.cpp b/gui/TextBuffer.cpp index ad3025c..f819bd1 100644 --- a/gui/TextBuffer.cpp +++ b/gui/TextBuffer.cpp @@ -1,6 +1,15 @@ #include "TextBuffer.h" -DWORD WINAPI FlushThread(LPVOID lParam); // window.cpp +DWORD WINAPI FlushThread(LPVOID lParam) +{ + TextBuffer* t = (TextBuffer*)lParam; + while (t->Running()) + { + t->Flush(); + Sleep(10); + } + return 0; +} TextBuffer::TextBuffer(HWND edit) : hThread(IthCreateThread(FlushThread, (DWORD)this)), hEdit(edit), diff --git a/gui/window.cpp b/gui/window.cpp index 66f4e27..fe84a05 100644 --- a/gui/window.cpp +++ b/gui/window.cpp @@ -806,13 +806,3 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) return 0; } -DWORD WINAPI FlushThread(LPVOID lParam) -{ - TextBuffer* t = (TextBuffer*)lParam; - while (t->Running()) - { - t->Flush(); - Sleep(10); - } - return 0; -}