in server.cpp
Code:
LRESULT CALLBACK CServer::WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
CServer *pServer=(CServer *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
if (message == WM_CLOSE)
{
pServer->OnClose();
return 0;
}
else if (message >= WM_FILEZILLA_SERVERMSG) // system message can enter this (for example message=49365)
{
UINT index = message - WM_FILEZILLA_SERVERMSG;
if (index >= pServer->m_ThreadNotificationIDs.size())
return 0; // if system message enter ,the message can't be handled.
..........
}
return ::DefWindowProc(hWnd, message, wParam, lParam);
}
Code:
else if (message >= WM_FILEZILLA_SERVERMSG && message < WM_FILEZILLA_SERVERMSG + pServer->m_ThreadNotificationIDs.size()) // it can limit the scope of the WM_FILEZILLA_SERVERMSG