Help With Rectangle,
as some of you might already know I am learning programming on my own for now, I've bumped into the function that draws a rectangle (I think) but I don't know how to implement it.......could anybody please show me an example of it?
This is all the book says.......
BOOL Rectangle ( HDC hdc, int nleftrect, int ntoprect, int nrightrect, int nbottomrect );
return nonzero on failure.....
could you please show me an example of how this could be used on a win32 program?
After the window is passed the WM_PAINT message have the window do something similar to the following:
hDc=BeginPaint([handle of window to draw to], &ps);
//Create a pen to draw with
hpen=CreatePen(PS_SOLID, 1, RGB(0,0,0));
//Select pen into the device context
//draw the rectangle (using current pen)
Rectangle(hDc, 0, 0, 25, 25);
EndPaint([window handle], &ps);
Hope this helps.
Thank you very much Been......I Shall save this info :D