void LogSeriesProp::Close() { CWnd * targetWnd = this->GetTargetWnd(); if (targetWnd) { LRESULT destroyed = targetWnd->SendMessage(WM_APP, CMD_SERIES_CLOSED, 0); if (! destroyed) { targetWnd->PostMessage(WM_APP, CMD_DATA_CLEAR, (LPARAM)this); targetWnd->InvalidateRgn(NULL, 1); } SetTargetWnd(0); } SeriesProp::Close(); }
BOOL WeaselTrayIcon::Create(HWND hTargetWnd) { HMODULE hModule = GetModuleHandle(NULL); CIcon icon; icon.LoadIconW(IDI_ZH); BOOL bRet = CSystemTray::Create(hModule, NULL, WM_WEASEL_TRAY_NOTIFY, WEASEL_IME_NAME, icon, IDR_MENU_POPUP); if (hTargetWnd) { SetTargetWnd(hTargetWnd); } if (!m_style.display_tray_icon) { RemoveIcon(); } return bRet; }