I have a dialog with a CEdit and a CSpinButtonCtrl.
This is my code:
void CInformDlg::OnDeltaposSpinLog(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
if (pNMUpDown->iDelta == -1) //Arriba
m_strLog = sText1;
else //Abajo
m_strLog = sText2;
m_editLog.SetSel(-1,-1);
UpdateData (FALSE);
*pResult = 0;
}
Where m_editLog is the edit and m_strLog is a CString variable associated with the edit. With this code, the text in CEdit is always selected, and I don't want this. What am I doing bad?
Thank you in advance.