I have recently tried to do the same as you, with the same result. To go from Windows Vista to Windows 8 you have to do a clean install. In general, this means you then have to reinstall the drivers for the graphics/sound/Lan etc. Unfortunately there are no Windows 8 compatible drivers from HP or NVidia available. I tried installing the original and latest Vista drivers from them both, but the installation wizards prevented me from proceeding. The 1028x768 resolution is coming from the basic Windows 8 generic driver. One of those 3 organisations (HP NVidia Microsoft) needs to come up with a better graphics driver for the problem to be resolved.
If you are keen to have another go, you could try doing an in place upgrade to windows 7 and then another in place upgrade to windows 8. On the plus side, Windows 8 upgrade advisor passed the Nvidia graphics driver as compatible. On the negative side I know many people reported a loss of functionality issue just upgrading to Windows 7 (loss of touchscreen and loss of Media Centre)
Basically HP have failed to support any upgrade of this model, which is a great shame. They didn't support the upgrade to Windows 7 when it came out in 2009, so being now 4 to 5 years old it seems unlikely that HP will devote any time to it now - I hope I am wrong. I have regretfully decided to abandon hope for the present. Instead I am going to do a factory reinstall of Windows Vista to get rid of all the crap my son has loaded in the past couple of years. I will then only reload the programs I actually want, so hopefully my IQ772 will work faster. If I still want more speed I may swap the hard drive for an SSD.