fix tray icon disappearing, var type warning, code tabulation

This commit is contained in:
R4SAS 2019-02-06 00:24:01 +03:00
parent 6d9e5147b5
commit a14d554947
3 changed files with 54 additions and 29 deletions

View file

@ -166,10 +166,13 @@ namespace win32
static LRESULT CALLBACK WndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
static UINT s_uTaskbarRestart;
switch (uMsg)
{
case WM_CREATE:
{
s_uTaskbarRestart = RegisterWindowMessage(TEXT("TaskbarCreated"));
AddTrayIcon (hWnd);
break;
}
@ -318,6 +321,12 @@ namespace win32
EndPaint(hWnd, &ps);
break;
}
default:
{
if (uMsg == s_uTaskbarRestart)
AddTrayIcon (hWnd);
break;
}
}
return DefWindowProc( hWnd, uMsg, wParam, lParam);
}