diff options
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r-- | c/episodelistview.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp index b683114..db67ca9 100644 --- a/c/episodelistview.cpp +++ b/c/episodelistview.cpp @@ -162,7 +162,8 @@ LRESULT EpisodeListView::HandleNotify(const LPARAM lParam) const ElvDataA& e = parent.fvElv.At(nm->nmcd.lItemlParam-1); if (!e.bWatched) { extern HFONT g_hfBold; - Require(SelectObject(nm->nmcd.hdc, g_hfBold)); + if (!SelectObject(nm->nmcd.hdc, g_hfBold)) + throw Err(WINDOWS, L"Bold font could not be selected: %s"); return CDRF_NEWFONT; } break; @@ -183,8 +184,9 @@ LRESULT EpisodeListView::HandleNotify(const LPARAM lParam) case NM_RCLICK: { const DWORD pos = GetMessagePos(); - Require(TrackPopupMenu(parent.hMenuPopup, TPM_RIGHTBUTTON, - LOWORD(pos), HIWORD(pos), 0, parent.hWnd, nullptr)); + if (!TrackPopupMenu(parent.hMenuPopup, TPM_RIGHTBUTTON, + LOWORD(pos), HIWORD(pos), 0, parent.hWnd, nullptr)) + throw Err(WINDOWS, L"Context menu could not be opened: %s"); return 0; } |