Wav files and midi files are two totally different things. There are many ways to get audio into you computer. Guitar->Amp->Mic->Mic input on computer soundcard. or Guitar->(insert favorite preamp)->line input on computersound card just to name the most common ways. If you had a guitar preamp with digital out and a soundcard with digital in you could go that way also.
To record guitar via midi you need a midi converter installed on the guitar it self to be able to send a midi signal to some kind of midi sound module ( this is more of a guitar synth setup) send the audio out of the sound module output to the line in on your soundcard. Depending on your computer hardware, if you have a midi input you should be able to trigger the sounds in your sound module also.
Also depending on you hardware you record both the Audio coming from your guitar amp or whatever at the same time you record the Midi triggered sounds.
Many possibilities here.
Regards,
TJ