2

I'm trying to frame a window using GDI+ Graphics class in OnPaint(). Since DrawPath() function requires GraphicsPath, Is there a way to get GraphicsPath of a window ?

ivymike
  • 1,511
  • 2
  • 20
  • 27

1 Answers1

1

Why not use DrawRectangle(Pen*,Rect&) instead. It only requires a rectangle and you can easily get that with GetClientRect().

snowdude
  • 3,854
  • 1
  • 18
  • 27
  • Unfortunately, the window I want to set a border around is a custom clipped window (intersection of a rectangle and rounded rectangle) created using SetWindowRgn(). I can probably create a GraphicsPath by adding a few arcs and rectangle but I'm looking for a generic way to get a path from already existing window. – ivymike Jul 13 '12 at 08:54