Hello!
That's not a big question.
I'm working with CEdit. Everything included, I put DDV, also created my handlers for changing edit and set some properties like (only numbers etc.) but...
Sometimes I get value with a comma. I get 14,999 instead 14999. Does somebody know what is it?
I couldn't find nothing in internet.
Thanks a lot)
My data exchange:
DDX_Text(pDX, IDC_EDIT_X, m_pLayout->m_nX);
DDX_Text(pDX, IDC_EDIT_Y, m_pLayout->m_nY);
DDV_MinMaxInt(pDX, m_pLayout->m_nHeight, 0, RANGE);
DDV_MinMaxInt(pDX, m_pLayout->m_nWidth, 0, RANGE);
Handler for spin:
NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
UpdateData(TRUE);
UpdateSpinVal(m_pLayout->m_nWidth, pNMUpDown->iDelta);
Update spin:
void UpdateSpinVal(int & val, int & delta)
{
int iTemp = val += delta;
if(val > RANGE)
val = RANGE;
if(val < 0)
val = 0;
UpdateData(FALSE);
if(iTemp != val)
return;
m_bWasSpin = TRUE;
UpdateData(FALSE);
}
That's my code
Everything is OK. I'm quitly surprised!