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

Custom Draw ClistCtrl and message handling

Expand Messages
  • smartmobili
    Hi, I have uplodaded (customdrawlit_ce.zip) a sample project with a custom draw list ctrl that I am trying to developp. I have some issues with customdrawing :
    Message 1 of 3 , Nov 2, 2008
      Hi,

      I have uplodaded (customdrawlit_ce.zip) a sample project with a custom
      draw list ctrl that I am trying to developp.
      I have some issues with customdrawing :

      When control is in report mode
      1) in OnPostPaint it seems I cannot get if item is selected or not
      2) How can I draw my icon transparently when there is a background
      image or a color.

      Another thing I don't understand is about message handling, indeed I
      have a command bar with a ID_ACTION message id that is catched by the
      mainframe but I would like to handle it in the current view.
      I thought that commenting the message handler would be enough to
      receive it in the view but it doesn't work so if someone knows why ...

      Thanks
    • smartmobili
      ... Oups I wanted to say in large Icon mode, I havent t tested what happens in report mode.
      Message 2 of 3 , Nov 2, 2008
        --- In wtl@yahoogroups.com, "smartmobili" <smartmobili@...> wrote:
        >
        > Hi,
        >
        > I have uplodaded (customdrawlit_ce.zip) a sample project with a custom
        > draw list ctrl that I am trying to developp.
        > I have some issues with customdrawing :
        >
        > When control is in report mode
        Oups I wanted to say in large Icon mode, I havent't tested what
        happens in report mode.
      • Alain Rist
        Hi, ... Use CListViewCtrl::GetSelectedIndex() or CListViewCtrl::GetSelectedItem(). ... Use ::ImageList_SetBkColor() with CLR_NONE. ... Use
        Message 3 of 3 , Nov 2, 2008
          Hi,

          >1) in OnPostPaint it seems I cannot get if item is selected or not
          Use CListViewCtrl::GetSelectedIndex() or CListViewCtrl::GetSelectedItem().

          >2) How can I draw my icon transparently when there is a background
          >image or a color.
          Use ::ImageList_SetBkColor() with CLR_NONE.

          > ID_ACTION message id that is catched by the mainframe but I
          >would like to handle it in the current view
          Use CHAIN_COMMANDS_MEMBER() in your frame class.

          cheers,
          AR


          ----- Original Message -----
          From: smartmobili
          To: wtl@yahoogroups.com
          Sent: Sunday, November 02, 2008 1:25 PM
          Subject: [wtl] Custom Draw ClistCtrl and message handling


          Hi,

          I have uplodaded (customdrawlit_ce.zip) a sample project with a custom
          draw list ctrl that I am trying to developp.
          I have some issues with customdrawing :

          When control is in report mode
          1) in OnPostPaint it seems I cannot get if item is selected or not
          2) How can I draw my icon transparently when there is a background
          image or a color.

          Another thing I don't understand is about message handling, indeed I
          have a command bar with a ID_ACTION message id that is catched by the
          mainframe but I would like to handle it in the current view.
          I thought that commenting the message handler would be enough to
          receive it in the view but it doesn't work so if someone knows why ...

          Thanks
        Your message has been successfully submitted and would be delivered to recipients shortly.