You cannot turn off the power while the computer is sleeping. It needs to keep the RAM powered up to remember the information to resume. That is why you are getting the message that Windows did not shut down correctly.
You can turn off the power for hibernation however, since the resume information is written to the hard drive.
Windows 7 also has a hybrid sleep mode that lets it go to sleep but also stores the resume info on the hard drive and if the power is turned off, it will resume as if it were hibernated