void CGridDlg::OnDeltaposSpinColorCount(NMHDR *pNMHDR, LRESULT *pResult) { LPNMUPDOWN pNMUpDown = reinterpret_cast<LPNMUPDOWN>(pNMHDR); UINT value; if(getUintEmptyZero(IDC_EDITCOLORCOUNT, value)) { const int delta = -pNMUpDown->iDelta; if(value == 0) { if(delta < 0) { setColorCount(400); } } else { setColorCount(value + delta); } } *pResult = 0; }
void TdwPalette::setTdwFile(TdwFile *tdw) { setColorCount(tdw->isOptimizedVersion() ? 4 : 16); this->tdw = tdw; setCurrentPalette(_currentPalette); }
void CGridDlg::OnEnChangeEditColorCount() { if(m_changeHandlerActive) return; m_changeHandlerActive = true; UINT value; if(getUintEmptyZero(IDC_EDITCOLORCOUNT, value)) { setColorCount(value); } m_changeHandlerActive = false; }