You're saying this doesn't work?
- Code:
HRESULT CMyApplication::StylusDown(POINT p)
{
TCHAR sTemp[16];
if (AxeY >222 && AxeY < 251)
{ if (AxeX >50 && AxeX < 69)
_stprintf(sTemp,"%s1", m_Saisie); //button 1
else if (AxeX >76 && AxeX < 95)
_stprintf(sTemp, "%s2", m_Saisie); //buton 2
else _stprintf(sTemp, "%s", m_Saisie);
_stprintf(m_Saisie, "%s", sTemp);
}
return S_OK;
}
You should replace those last two _stprintf lines with the unicode version of strcpy, but regardless that should work.
After looking at your sample, I found another problem... You don't see what's wrong with this line?
- Code:
_stprintf(strSaisie, TEXT("SAISIE [%c ]"),*m_Saisie);
%c means a character, not a string.
Using the asterisk in front of the string just gives you the first character.
It should be:
- Code:
_stprintf(strSaisie, TEXT("SAISIE [%s ]"), m_Saisie);
However, if your definition of m_Saisie is the same as strSaisie, you should get rid of strSaisie altogether.
-John