Faisal Shahzad wrote: > i want to make a calculator in c++ MFC but i want hint plz give me hint > how i made logic that when user press for example 1 display in edit box > 1 after that when i press 2 then written 2 on right side mean it beome > 12. i m waiting for ur help plz reply soon
Handle the OnChar() message in your code: http://msdn2.microsoft.com/en-us/library/3zzfkd75(VS.80).aspx To get the number that was pressed by the user. I'm assuming you are making your edit box not able to have keyboard focus like calc.exe does. Someone already mentioned: NewNumberInBox = (CurrentNumberInBox * 10) + NumberPressedByUser; -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* VerifyMyPC 2.5 Change tracking and management tool. Reduce tech. support times from 2 hours to 5 minutes. http://www.CubicleSoft.com/VerifyMyPC/
