| 2425 | } |
| 2426 | |
| 2427 | void CColorCopDlg::OnColorSnaptowebsafe() { |
| 2428 | m_Appflags ^= SnaptoWebsafe; |
| 2429 | |
| 2430 | if (m_Appflags & SnaptoWebsafe) { |
| 2431 | m_Appflags &= ~DetectWebsafeColors; // shut off Websafe Detection |
| 2432 | SetStatusBarText(IDS_SNAPTOWEBSAFE, 1); |
| 2433 | } else { |
| 2434 | SetStatusBarText(IDS_SNAPTOWEBSAFE, 2); |
| 2435 | } |
| 2436 | |
| 2437 | if (!(m_Appflags & SnaptoWebsafe) && m_oldColorSaved) { |
| 2438 | // Snap-to-Websafe was just turned OFF and we have a saved pre‑snap color. |
| 2439 | // Restore the original RGB values that were backed up when snapping was enabled. |
| 2440 | m_Reddec = m_OldRed; |
| 2441 | m_Greendec = m_OldGreen; |
| 2442 | m_Bluedec = m_OldBlue; |
| 2443 | } |
| 2444 | OnconvertRGB(); |
| 2445 | OnCopytoclip(); |
| 2446 | } |
| 2447 | |
| 2448 | void CColorCopDlg::OnUpdateColorSnaptowebsafe(CCmdUI* pCmdUI) { |
| 2449 | pCmdUI->SetRadio(m_Appflags & SnaptoWebsafe); |
nothing calls this directly
no outgoing calls
no test coverage detected