| 530 | } |
| 531 | |
| 532 | bool Alert::IsOKButton(HWND button_handle) { |
| 533 | int control_id = ::GetDlgCtrlID(button_handle); |
| 534 | if (control_id != 0) { |
| 535 | return control_id == IDOK || control_id == IDYES || control_id == IDRETRY; |
| 536 | } |
| 537 | std::vector<wchar_t> button_window_class(100); |
| 538 | ::GetClassName(button_handle, &button_window_class[0], static_cast<int>(button_window_class.size())); |
| 539 | if (wcscmp(&button_window_class[0], L"Button") == 0) { |
| 540 | long window_long = ::GetWindowLong(button_handle, GWL_STYLE); |
| 541 | long button_style = window_long & BS_TYPEMASK; |
| 542 | return button_style == BS_DEFCOMMANDLINK || button_style == BS_DEFPUSHBUTTON; |
| 543 | } |
| 544 | return false; |
| 545 | } |
| 546 | |
| 547 | bool Alert::IsCancelButton(HWND button_handle) { |
| 548 | int control_id = ::GetDlgCtrlID(button_handle); |
nothing calls this directly
no test coverage detected