Loading ...
Sorry, an error occurred while loading the content.

Can I use WTL to create a custom control without a control base class?

Expand Messages
  • hawkgao
    Hi, all, Even all articles i get from google talk about custom draw control create new control base on a already existed control, like CListViewCtrl. I want to
    Message 1 of 2 , Nov 30, 2008
    • 0 Attachment
      Hi, all,
      Even all articles i get from google talk about custom draw control
      create new control base on a already existed control, like
      CListViewCtrl. I want to create a custom control base on CWindow directly.

      Thanks
      Xiang
    • Igor Tandetnik
      ... Derive from CWindowImpl the same way you would derive from an existing control. Handle all the necessary messages, most importantly WM_PAINT. -- With best
      Message 2 of 2 , Dec 1, 2008
      • 0 Attachment
        hawkgao <hawkgao@...> wrote:
        > Even all articles i get from google talk about custom draw control
        > create new control base on a already existed control, like
        > CListViewCtrl. I want to create a custom control base on CWindow
        > directly.

        Derive from CWindowImpl the same way you would derive from an existing
        control. Handle all the necessary messages, most importantly WM_PAINT.
        --
        With best wishes,
        Igor Tandetnik

        With sufficient thrust, pigs fly just fine. However, this is not
        necessarily a good idea. It is hard to be sure where they are going to
        land, and it could be dangerous sitting under them as they fly
        overhead. -- RFC 1925
      Your message has been successfully submitted and would be delivered to recipients shortly.