Results 1 to 3 of 3

Thread: LISTVIEW_SETBKCOLOR? where to put it?

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 1999
    Posts
    50

    Question

    Hi guys,

    In fact I am not the question owner, it's my brother's and I will put as he asked me to: where should we put in the source code LISTVIEW_SETBKCOLOR macro? he says he tried to put in many places but with no result?

    Could you help,

    Thank you.

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    MSDN says this about it:
    Code:
    ListView_SetBkColor
    
    
    Sets the background color of a list view control. You can use this macro or send the LVM_SETBKCOLOR message explicitly. 
    
    BOOL ListView_SetBkColor(
        HWND hwnd, 
        COLORREF clrBk
    );
    
    Parameters
    hwnd 
    Handle to the list view control. 
    clrBk 
    Background color to set or the CLR_NONE value for no background color. List view controls with background colors redraw themselves significantly faster than those without background colors.
    ...the best place to use it is just after it has been shown.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 1999
    Posts
    50

    Question

    I gave the code you provided to my brother, but unfortunately it did not work, he says:

    * He uses a resource in which this listview resides.
    * He put the function ONWM_SHOWINDOW event.
    * It always works for 1 second, and then returns to the
    traditional white background quickly.
    * That's why he thinks that the place where this function
    had been put is incorrect (in his view point?).
    * Could you provide me with small working source code?

    Thank you,

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