dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: More than five time the questions like this have asked, but no good answers have repl

  1. #1
    Join Date
    Aug 2001
    Posts
    60

    Smile More than five time the questions like this have asked, but no good answers have repl

    Dear Guru
    I need to create fixed column for listview.
    I search for the previous question and answer on visual c++ forum
    and I found that more than five time the question like my question has asked before
    but there is no the correct answer

    If anyone know how to create fixed column for listview please help me.

    Thank You.

    Sorry for bad English.

  2. #2
    Join Date
    Apr 2003
    Location
    Athens, Greece
    Posts
    1,094
    Hi,
    Could you explain in more details what do you mean by fixed columns?
    Is it that the columns cannot be resized by the user?
    Extreme situations require extreme measures

  3. #3
    Join Date
    May 1999
    Location
    DELAWARE, USA
    Posts
    9,917
    Simply handle HDN_BEGINTRACK headerís notification message and set pResult to 1.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

  4. #4
    Join Date
    Aug 2001
    Posts
    60

    Smile

    I'm using the listview common control in LVS_REPORT mode. I'd like to have the left column fixed and use the horizontal scroll to only scroll the remaining columns.


    Suppose I have:

    col1 col2 col3 col4

    visible and there are more columns. If the user scrolls to the right, I'd like them to see:

    col1 col3 col4 col5

  5. #5
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871
    That seems a comlicated one! You may need to implemnt your own DrawItem - but that might not serve your purpose.
    Try using CScrollView and implement complete drawing in it.

    You may also use two controls and make the user fool!
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

  6. #6
    Join Date
    May 1999
    Location
    DELAWARE, USA
    Posts
    9,917

    Re: More than five time the questions like this have asked, but no good answers have repl

    Originally posted by Phogang
    I need to create fixed column for listview.
    Originally posted by Phogang
    I'd like to have the left column fixed and use the horizontal scroll to only scroll the remaining columns.
    You have just change requirements. Why didnít you describe it the same way from the beginning?

    I thought my hint would help you. Check if cursor is over first divider and return 1; return 0 if otherwise. Alternatively, derive your own header class, subclass it with viewís header. Now you have more control over it.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)