Oh right I see, looks like I misunderstood

If you know where on the screen you want to draw the rectangle, you can use the GDI function Rectangle() to do it. That requires you to select in the right pen and brush for the DC though. You can use BitBlt too, I think, so long as you don't mind using one of the common colour constants for your square colour.

If you'd rather stick with PSet or SetPixel, you could make a function that will draw a square of a given size at a given point, and in that function just use PSet or SetPixel to create the rectangle pixel by pixel. It will be pretty slow but simple. Personally I think I'd go for Rectangle().