Results 1 to 3 of 3

Thread: <Solved> Forcing an owner draw

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2011

    Resolved <Solved> Forcing an owner draw

    So, some controls(e.g. buttons/labels) dont have a drawmode property. Im looking to create buttons with rounded corners because they just look nicer :P.

    Now, the problem is that even when you have a custom paint event, the button just gets drawn first and the custom paint event will draw on top. Especially with rounded corners, where you see the parts of the default button in the corners.

    Is there a way to only execute the custom paint event / block the default paint?

    Thanks in advance
    Last edited by thomasderoo; Oct 27th, 2011 at 07:05 AM. Reason: Solved

  2. #2
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Moscow, Russia

    Re: Forcing an owner draw

    You can create your own usercontrol from scratch (button is probably the easiest one).
    Then you can draw it in any way you like.

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2011

    Re: <Solved> Forcing an owner draw


    Solved it by making a new class inheriting button, and overriding the OnPaint!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width