With my old computer, I had to disconnect the internet connection, turn off the firewall and disable my antimalware softwares. Even then I had to use at least 60 ms latency with playback. (5 years old laptop, XP)
I am sure that there is something wrong with the Cakewalk settings. Try to find ASIO input/output. That helped me, when I had exactly same problem as you.
I have Cakewalk (something) LE, I could install it and check it out. But you know the software probably better
BTW what kind of MIDI to USB device you use? I have M-Audio Midisport 1x1 and Windows 7 is not supported..