I'll tell you how you can figure out how to send keystorkes to calc.exe.
Use spy++ to monitor the messages on the calc.exe window process as you're using it. To do this go into spy++ and click on the log messages toolbar button. Drag the cursor onto the calc.exe window. The instructions I gave are for VS2008, they may differ slightly for the Spy++ included in other VS versions. But the same functionality has always been available.
You will see exactly what messages are sent as you are entering text. You need to do the same.
Use the Win32 API SendMessage, LPARAM and WPARAM to your found window handle.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…