drawing NOT filled Rectangles?

hey guys, i have a suppose-to-be simple task which i can't figure out:
how do i draw a simple "transparent" rectangle (Win32 GDI).
i'm using a solid pen.

Google only finds how to draw Filled rectangles..

thanks.
If you are using the Rectangle WinAPI function, it will use whatever brush is currently selected into the DC to fill the rect.

If you want no filling, then select a null brush:

1
2
SelectObject( mydc, GetStockObject( NULL_BRUSH ) );
Rectangle( ... ); // <- will be 'transparent'/unfilled 
Thanks!!
i think by default rectangles should be transparent, and filled by will, but windows decides to fill them white..
Registered users can post here. Sign in or register to post.