- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like some help on how to use the SelectClipRgn function in my application.It basically involves drawing some curves on a static image(in a dialog box) and any part of the curve outside the static image should be clipped out and not displayed.I am using the Arc function to draw the curves.Any pointers?
-rswy
-rswy
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Should be (untested):
Jugoslav
integer:: hrgn hrgn = CreateRectRgn(17, 42, 212, 197) i = SelectClipRgn(hdc, hrgn) i = DeleteObject(hrgn) ...do the drawing i = SelectClipRgn(hdc, 0)But, first, what do you refer to by "static image"? If it's a control (e.g. a static control), the output should be clipped automatically without need to call SelectClipRgn. If you're drawing directly onto dialog's hDC, I'd suggest drawing onto a static control instead. See the sample which comes with Xflogm -- it uses SS_OWNERDRAW static control and actually handles WM_DRAWITEM (see DLG_DRAWITEM under refernce).
Jugoslav

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page