As the HP driver page linked by viveknayyar007 states, the drivers for the HP DeskJet 840c are available through Windows Update. Simply connect the device, and then allow the device to install automatically retrieving its drivers from Microsoft Update. If this does not automatically occur, you can follow the instructions provided in
this video from HP to enable automatic driver updates.