uh-oh,
I tried replacing my old source with your code and I get a load of new errors:
C:\DOCUME~1\Keith\LOCALS~1\Temp\ccKgcaaa.o(.text+0x131)
[Warning] In function `Z7WndProcP6HWND__jjl':
[Linker error] undefined reference to `CreateSolidBrush@4'
[Linker error] undefined reference to `CreatePen@12'
[Linker error] undefined reference to `SelectObject@8'
[Linker error] undefined reference to `SelectObject@8'
[Linker error] undefined reference to `MoveToEx@16'
[Linker error] undefined reference to `LineTo@12'
[Linker error] undefined reference to `Rectangle@20'
[Linker error] undefined reference to `RoundRect@28'
[Linker error] undefined reference to `Ellipse@20'
[Linker error] undefined reference to `SelectObject@8'
[Linker error] undefined reference to `SelectObject@8'
[Linker error] undefined reference to `DeleteObject@4'
[Linker error] undefined reference to `DeleteObject@4'
I'm using Dev-C++ btw