none
Cannot Change Colour Of Each Row In SysTreeView32 RRS feed

  • Question

  • Hi Enginner 

    How To Can We Send Message To SysTreeView32 Class To Change Color Of Each Row Or First Red Second Blue Third Red And So On . Could You Please Put Simpe Code Needs Using Of WM_CTLCOLORBTN? 

    Tuesday, April 30, 2019 5:02 PM

All replies

  • Hi,

    I did not find the control SysTreeView32 in winform, only the control Treeview, it is a C++ control?

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 1, 2019 7:17 AM
  • No Sir , I Got The Handle Of Treeview And We Need Some Code To Change Color Of Text In Root Or Child , Then When Do Clicked By Mouse On Each Item Send The Text To Window Caption  , I Cannot Control WM_NOTIFY And NM_CLICK 

    Wednesday, May 1, 2019 7:25 PM
  • Hi,

    I think if Treeview is your internal control, you can set the background color directly:

    Child=>treeview1.Nodes[0].Nodes[2].BackColor=Color.Gray
    Root=>treeView1.Nodes[0].BackColor = Color.Gray;

    If you want use handle,see the foloowing link:

    https://stackoverflow.com/questions/19178872/changing-the-backcolor-of-a-childnode-in-the-treeview

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, May 2, 2019 8:33 AM
  •  

    Case WM_PARENTNOTIFY In SubClassing Return 513 For WM_LBUTTONDOWN Only And Various Lparam For Each Item But I Do Not Know The Lparam Is HwndItem Or Related To Its Position , Regarding To Color Changing By TVM_SETTEXTCOLOR When Press Left Mouse Button Will Be Done But Effect On All Items For Examlpe If Write In Lparam Of TVM_SETTEXTCOLOR , RGB(255,0,0) All Text Color Change To Red .


    Thursday, May 2, 2019 10:11 AM
  • Hi,

    I would like to ask if you are building a C# project or a C++ project?Do you use C# to call the SendMessage function to change the color of the control?

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, May 3, 2019 8:38 AM
  • Not in C# ... Microsoft Access ... Hook And SubClassing The BrowseForFolder  Window And Changed Some Items ... it was Used SendMessage To Change The Color But Nobody Knows This In Access Forum ... In Vba Could Not Use In WM_PARENTNOTIFY ...lpdis=(DrawitemStruct)lparam ... Just Use CopyMemory 

    I Used Copymemory lpdis,Byval lparam,Len(lpdis)  And Application Closed Automatic  Have I To Use Len(Destination) Or Just Write Number ?



    Sunday, May 5, 2019 4:24 PM
  • Hi,

    Do you still want to use the sendmessage function to change the backcolor of Treeview?I think you can try the following method:

    https://stackoverflow.com/questions/21198668/treenode-selected-backcolor-while-treeview-not-focused

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, May 9, 2019 7:03 AM