Results 1 to 13 of 13

Thread: [RESOLVED] List View (Common Controls 5) GridLines Issue

  1. #1

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Resolved [RESOLVED] List View (Common Controls 5) GridLines Issue

    Hai all,

    i am strugling to apply the grid lines to the MS Common Controls 5 List View.
    I have attached the project with the comctl32.ocx i have.

    Please help !
    Attached Files Attached Files

  2. #2

  3. #3

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: List View (Common Controls 5) GridLines Issue

    Quote Originally Posted by RhinoBull
    Version 5 doesn't expose that property at all so if you need it then use v6 of common controls.
    No rihno, i am trying to set gridlines using SetWindowLong() to set the LVS_EX_GRIDLINES style. My Project shows it.

    I really really need this since version 6 does not support XP Style.

  4. #4

  5. #5

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: List View (Common Controls 5) GridLines Issue

    Quote Originally Posted by RhinoBull
    OK, you will need to use SendMessage instead: Display ListView Grid Lines
    Thanks RhinoBull. actually i was redirected to this page few hours a go when i search google and put there sendMessage code. at that time it did not make an effect except a thik border was added to the upper part of the header area. so i removed that code. let me try it again.

  6. #6

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: List View (Common Controls 5) GridLines Issue

    Oh Rihno, It is working now !!! It is working Now!!!. Let me come back in a second,

  7. #7

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: List View (Common Controls 5) GridLines Issue

    Ok rihno, actually, when i tried earlier i did not use that state thing. what is that state thing is? what is the lparam look for here?

  8. #8

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: List View (Common Controls 5) GridLines Issue

    Ok it seem the lparam is the ON/Off status of the grid lines.

    Thanks rihno for bring me back this code.

    bye

  9. #9
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: List View (Common Controls 5) GridLines Issue

    Al I could do was shaking my head...

    Anyway, "state" is a long integer that is used in that sample to get current state of checkbox because it's a demonstration of how to toggle the Gridlines by checking/unchecking the Checkbox...

    You don't need that - replace the state with 1 and you'll be allright.

  10. #10

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: List View (Common Controls 5) GridLines Issue

    Quote Originally Posted by RhinoBull
    Al I could do was shaking my head...

    Anyway, "state" is a long integer that is used in that sample to get current state of checkbox because it's a demonstration of how to toggle the Gridlines by checking/unchecking the Checkbox...

    You don't need that - replace the state with 1 and you'll be allright.
    Righno, the funny think is, if i replaced it with 1, it does not work. this is what happend to me on my first try. ok. i ll post the project with set to 1. have a try . let me upload.

  11. #11

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: [RESOLVED] List View (Common Controls 5) GridLines Issue

    i have attached.
    Last edited by Fazi; Jul 22nd, 2007 at 01:55 PM.

  12. #12
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: [RESOLVED] List View (Common Controls 5) GridLines Issue

    I don't know what you do but here is what you need:
    Code:
        Call SendMessage(ListView1.hwnd, _
                        LVM_SETEXTENDEDLISTVIEWSTYLE, _
                        LVS_EX_GRIDLINES, ByVal 1)
    Make sure you have all the declarations in place.

  13. #13

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: [RESOLVED] List View (Common Controls 5) GridLines Issue

    OK. I Messed up with byVal & state thing. sorry. now allright.

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