|
|
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.
|