| 545 | } |
| 546 | |
| 547 | bool Alert::IsCancelButton(HWND button_handle) { |
| 548 | int control_id = ::GetDlgCtrlID(button_handle); |
| 549 | if (control_id != 0) { |
| 550 | return control_id == IDCANCEL || control_id == IDNO; |
| 551 | } |
| 552 | std::vector<wchar_t> button_window_class(100); |
| 553 | ::GetClassName(button_handle, &button_window_class[0], static_cast<int>(button_window_class.size())); |
| 554 | if (wcscmp(&button_window_class[0], L"Button") == 0) { |
| 555 | long window_long = ::GetWindowLong(button_handle, GWL_STYLE); |
| 556 | long button_style = window_long & BS_TYPEMASK; |
| 557 | // The BS_DEFCOMMANDLINK mask includes BS_COMMANDLINK, but we |
| 558 | // want only to match those without the default bits set. |
| 559 | return button_style == BS_COMMANDLINK || button_style == BS_PUSHBUTTON; |
| 560 | } |
| 561 | return false; |
| 562 | } |
| 563 | |
| 564 | bool Alert::IsLinkButton(HWND button_handle) { |
| 565 | std::vector<wchar_t> button_window_class(100); |
nothing calls this directly
no test coverage detected