예제 #1
0
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;
}
예제 #2
0
void TdwPalette::setTdwFile(TdwFile *tdw)
{
	setColorCount(tdw->isOptimizedVersion() ? 4 : 16);

	this->tdw = tdw;
	setCurrentPalette(_currentPalette);
}
예제 #3
0
void CGridDlg::OnEnChangeEditColorCount() {
  if(m_changeHandlerActive) return;
  m_changeHandlerActive = true;
  UINT value;
  if(getUintEmptyZero(IDC_EDITCOLORCOUNT, value)) {
    setColorCount(value);
  }
  m_changeHandlerActive = false;
}