mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
[win] updatesvc: refactoring capplication
This commit is contained in:
@ -46,8 +46,10 @@ CApplication::~CApplication()
|
||||
int CApplication::exec()
|
||||
{
|
||||
MSG msg = {};
|
||||
while (GetMessage(&msg, NULL, 0, 0) > 0)
|
||||
{
|
||||
BOOL ret;
|
||||
while ((ret = GetMessage(&msg, NULL, 0, 0)) != 0) {
|
||||
if (ret == -1)
|
||||
break;
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
@ -58,14 +60,3 @@ void CApplication::exit(int code)
|
||||
{
|
||||
PostThreadMessage(mainThreadId, WM_QUIT, code, 0);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK CApplication::WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
// CObject *object = reinterpret_cast<CObject*>(GetWindowLongPtr(hWnd, GWLP_USERDATA));
|
||||
// if (object) {
|
||||
// int result = object->processEvents(hWnd, msg, wParam, lParam);
|
||||
// if (result != -1)
|
||||
// return result;
|
||||
// }
|
||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
||||
}
|
||||
|
||||
@ -45,9 +45,6 @@ public:
|
||||
int exec();
|
||||
void exit(int);
|
||||
|
||||
/* callback */
|
||||
static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
private:
|
||||
DWORD mainThreadId = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user