commitmonitor Code
Monitor your SVN repositories and notifies you on new commits
Brought to you by:
steveking
--- a/trunk/src/BaseDialog.cpp +++ b/trunk/src/BaseDialog.cpp @@ -52,11 +52,14 @@ } else { - if (!IsDialogMessage(m_hwnd, &msg) && - !TranslateAccelerator(hWndParent, hAccelTable, &msg)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); + if (!PreTranslateMessage(&msg)) + { + if (!IsDialogMessage(m_hwnd, &msg) && + !TranslateAccelerator(m_hwnd, hAccelTable, &msg)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } } } } @@ -102,7 +105,7 @@ OffsetRect(&rc, -rc.left, -rc.top); OffsetRect(&rc, -rcDlg.right, -rcDlg.bottom); - SetWindowPos(hwndDlg, HWND_TOP, rcOwner.left + (rc.right / 2), rcOwner.top + (rc.bottom / 2), 0, 0, SWP_NOSIZE); + SetWindowPos(hwndDlg, HWND_TOP, rcOwner.left + (rc.right / 2), rcOwner.top + (rc.bottom / 2), 0, 0, SWP_NOSIZE|SWP_SHOWWINDOW); HICON hIcon = (HICON)::LoadImage(hResource, MAKEINTRESOURCE(iconID), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE|LR_SHARED); ::SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon); ::SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)hIcon); @@ -159,3 +162,8 @@ else return DefWindowProc(hwndDlg, uMsg, wParam, lParam); } + +bool CDialog::PreTranslateMessage(MSG* /*pMsg*/) +{ + return false; +} \ No newline at end of file