Results 1 to 8 of 8

Thread: Need api constant for returning listview columns count

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2001
    Location
    San Jose, Ca. - USA
    Posts
    302

    Need api constant for returning listview columns count

    Im passing the hwnd of a listview to a csutom made dll which then fills the listview via sendmessage api calls. I found the api constants for this here:
    http://www.mvps.org/vbnet/code/comctl/lvmembers.htm

    But now I need to retrieve the listview.columns.count property.

    Anybody have any idea on how to do this via api or how to find the correct constant to use with sendmessage.

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    VB Code:
    1. Private Const HDM_FIRST = &H1200
    2. Private Const HDM_GETITEMCOUNT = (HDM_FIRST + 0)

    wParam = 0
    lParam = 0
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2001
    Location
    San Jose, Ca. - USA
    Posts
    302
    crptcblade, won't that return the listcount? I need the column count.

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Nope, LVM_GETITEMCOUNT will return the listcount.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2001
    Location
    San Jose, Ca. - USA
    Posts
    302
    sweet, I'll try it out.

    Can you tell me how to come about these constants myself?

  6. #6
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    I looked in the header files that come with Visual C++. Other than looking in those header files, I have no idea.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2001
    Location
    San Jose, Ca. - USA
    Posts
    302
    Originally posted by crptcblade
    I looked in the header files that come with Visual C++. Other than looking in those header files, I have no idea.
    thanks, crptcblade. That info is very much appreciated.

  8. #8
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    This is a very good program for API constants. This is a very good program for API declarations and examples.
    My evil laugh has a squeak in it.

    kristopherwilson.com

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