Murugan.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  PHP   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



VC Win32 Tree View Control Change Background color of tree


Home  > VC++  > VC Win32 Tree View Control Change Background color of tree 
       
Was trying to create a tree view control. Created . Need to know if the window was actually created. So thaught would change the color of the TreeView Control. 

Hers's my few lines of sample code

	COLORREF c= 0x44AAAA;
SendMessage(    // returns LRESULT in lResult
   oTree->hWndLV,           // (HWND) handle to destination control
   TVM_SETBKCOLOR,        // (UINT) message ID
   0,                // = 0; not used, must be zero 
   (LPARAM)c                 // = (LPARAM)(COLORREF) clrBk;
	);




Here's the description

lResult = SendMessage(    // returns LRESULT in lResult
   hWndControl,           // (HWND) handle to destination control
   TVM_SETBKCOLOR,        // (UINT) message ID
   wParam,                // = 0; not used, must be zero 
   lParam                 // = (LPARAM)(COLORREF) clrBk;
);

Parameters

    wParam
        Must be zero.
    clrBk
        COLORREF value that contains the new background color. If this value is -1, the control will revert to using the system color for the background color. 

Return Value

    Returns a COLORREF value that represents the previous background color. If this value is -1, the control was using the system color for the background color.


.Net VC File IO Sample Code

activex mdb

com smartcard

COM variant Data type

DirectX Store Video as mpeg

GetLastError() in VC++ Win32 Display the Value in a MessageBox

GetWindowName() VC++ Win32 Get a Window Name Given Handle

index

multi threaded socket

shellexecute open internet explorer

VC Win32 Tree View Control Change Background color of tree

VC++ 6.0 Win32 SetParent () Add an Existing Window as child window of another or Dynamically add a child window or Assign Window to a parent

VC++ 6.0 Win32 Splitter control like SplitContainer in .Net

VC++ 6.0 Win32 What are the Different Windows Controls That are Available in Win32 Non MFC

VC++ DWORD To String

VC++ Error LNK2001 unresolved external symbol public static

VC++ Win32 compare string with empty character constant

VC++ Win32 Compress Video To Mpeg

VC++ Win32 Exit Application

VC++ Win32 FTP Sessions Client Application

VC++ WIn32 IP from domain name

VC++ win32 Listview Get Selected Item

VC++ win32 ListView or LIST Control how to scroll to a list or make sure that a list item is visible

VC++ Win32 ListView SelectedItem()

VC++ Win32 Open in Internet explorer or firefox

Does Windows have an Inbuild FileExist function API



  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  PHP   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam