Results 1 to 4 of 4

Thread: Subclassing ListView

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2001
    Location
    ny
    Posts
    38

    Subclassing ListView

    I've been trying to subclass ListView, but with no luck. I've found very poor documentation on it, and examples that didn't do what I wanted. What I wanted is to intercept the message that is sent to draw text in a cell (Report view). Similiar to when WM_DRAWITEM is sent for a menu. I tried WM_NOTIFY, but that seemed pretty hopeless..as did WM_DRAWITEM. Any advice?

  2. #2
    gaffa
    Guest
    I've attached two modules that have all the messages and the like for a listview. They come from Brad Martinez' site - which is worth visiting, cos he has some very good samples on subclassing listviews

    - gaffa
    Attached Files Attached Files

  3. #3
    gaffa
    Guest
    And the second file (this one has all the API functions - very useful).

    Brad's site is at www.mvps.org

    - gaffa
    Attached Files Attached Files

  4. #4

    Thread Starter
    Member
    Join Date
    Dec 2001
    Location
    ny
    Posts
    38
    Thanks for the response.

    Not exactly what I'm looking for though. I downloaded an example of the guy's site to do Custom Drawing, but after looking over the code, I realized it wouldn't do what I wanted, nor does it help me figure out how.

    This is what I want to do: I'm making an IRC Client, and wish to display the topic of a channel in the Channel List, which is ListView, including all its formatting. Exactly like mIRC does. Now, the only thing I have a problem with is figuring out how to intercept when ListView draws the text, and drawing it myself. I may just use a listbox, since it uses WM_DRAWITEM, if that's what it comes down to.

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