mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-24 01:14:12 +08:00
move definition of flushthread to more sensible place
This commit is contained in:
parent
27fa8c7db7
commit
b6a43e7283
@ -1,6 +1,15 @@
|
|||||||
#include "TextBuffer.h"
|
#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)),
|
TextBuffer::TextBuffer(HWND edit) : hThread(IthCreateThread(FlushThread, (DWORD)this)),
|
||||||
hEdit(edit),
|
hEdit(edit),
|
||||||
|
@ -806,13 +806,3 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD WINAPI FlushThread(LPVOID lParam)
|
|
||||||
{
|
|
||||||
TextBuffer* t = (TextBuffer*)lParam;
|
|
||||||
while (t->Running())
|
|
||||||
{
|
|
||||||
t->Flush();
|
|
||||||
Sleep(10);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user