Page 1 of 1

numeric keyboard

PostPosted: Mar 24, 2004 @ 11:48pm
by Guest
hi all,
i trie to make a calculator like.

any one can help me how to strore the numbers pressed wit my
(keyboard) , i tried to use TCHAR and _sprintf but not find the whay.

thanks.

PostPosted: Mar 25, 2004 @ 11:07am
by Johan

PostPosted: Mar 25, 2004 @ 6:43pm
by _moadib
On phones you can know that numeric key pressed by charcode, example: '5' - key 5... It work at stationary PC( not NumPad)
Or what u want?

PostPosted: Mar 25, 2004 @ 8:13pm
by Guest

PostPosted: Mar 26, 2004 @ 3:16pm
by Presto
by using printf, you're replacing everything in the character string, which is why the 1 is being replaced by 2.

I haven't tried CString myself in any of my PPC apps, but if it works, that would probably be easiest.

Otherwise, you can try concatenation (strcat) (not sure what the unicode version is).

Or, you could use a temporary character string and do your own concatenation:
_stprintf(sTemp, "%s2", m_Saisie);
_stprintf(m_Saisie, "%s", sTemp);

-John

PostPosted: Mar 26, 2004 @ 10:08pm
by Guest

PostPosted: Mar 26, 2004 @ 10:53pm
by Presto

PostPosted: Mar 27, 2004 @ 2:15am
by Guest