So I started messing around with GDI, and I created this magnificent piece of art. The green rectangle is supposed to be located at 10 pixels from the borders at all sides. Here's my code for the rectangle displaying part:
The size of the window is 500x500 pixels. Logically speaking, the upper-left corner of the rectangle should be at 10x10 pixels and the lower-right corner at 490x490 pixels, right? Somehow, that's not what is being displayed... Any help?Code:RECT rc; HBRUSH fillColor = CreateSolidBrush ( RGB ( 0, 255, 0 ) ); rc.left = 10; rc.top = 10; rc.right = 490; rc.bottom = 490; FillRect ( hDc, &rc, fillColor );
Thanks.