LRESULT MainDialog::CancelButton::WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_SETCURSOR: { SetSharedCursor(IDC_HAND); return TRUE; } } return WindowProcDefault(hwnd, uMsg, wParam, lParam); }
LRESULT AnimeDialog::ImageLabel::WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_SETCURSOR: { if (parent->anime_id_ > anime::ID_UNKNOWN) { SetSharedCursor(IDC_HAND); return TRUE; } break; } } return WindowProcDefault(hwnd, uMsg, wParam, lParam); }
LRESULT MainDialog::MainTree::WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_SETCURSOR: { TVHITTESTINFO ht = {0}; HitTest(&ht, true); if (IsSeparator(GetItemData(ht.hItem))) { SetSharedCursor(IDC_ARROW); return TRUE; } break; } } return WindowProcDefault(hwnd, uMsg, wParam, lParam); }
LRESULT MainDialog::EditSearch::WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_COMMAND: { if (HIWORD(wParam) == BN_CLICKED) { // Clear search text if (LOWORD(wParam) == IDC_BUTTON_CANCELSEARCH) { SetText(L""); return TRUE; } } break; } } return WindowProcDefault(hwnd, uMsg, wParam, lParam); }
LRESULT MainDialog::StatusBar::WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_SETCURSOR: { POINT pt; GetCursorPos(&pt); ScreenToClient(GetWindowHandle(), &pt); win::Rect rect; GetRect(1, &rect); if (rect.PtIn(pt)) { SetSharedCursor(IDC_HAND); return TRUE; } break; } } return WindowProcDefault(hwnd, uMsg, wParam, lParam); }
LRESULT AnimeDialog::Tab::WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_PAINT: { if (::GetUpdateRect(hwnd, NULL, FALSE)) { PAINTSTRUCT ps; HDC hdc = ::BeginPaint(hwnd, &ps); OnPaint(hdc, &ps); ::EndPaint(hwnd, &ps); } else { HDC hdc = ::GetDC(hwnd); OnPaint(hdc, NULL); ::ReleaseDC(hwnd, hdc); } break; } } return WindowProcDefault(hwnd, uMsg, wParam, lParam); }
LRESULT Skype::Window::WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { if (::Skype.HandleMessage(uMsg, wParam, lParam)) return TRUE; return WindowProcDefault(hwnd, uMsg, wParam, lParam); }