Kbase P182223: How to change the background color in a treeview?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  08/02/2011 |
|
Status: Unverified
GOAL:
How to change the background color in a treeview?
GOAL:
Is it possible to change the background color in a treeview ActiveX
FACT(s) (Environment):
SendMessageA function
Windows
OpenEdge 10.x
CAUSE:
In order to test this code, create a window and include a treeview OCX and a button. Type the following code in a trigger for the button:
DEFINE VARIABLE chTreeViewFrame AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE iMyColor AS INTEGER NO-UNDO.
chTreeViewFrame = CtrlFrame:COM-HANDLE.
iMyColor = RGB-VALUE(192,192,192).
RUN SendMessageA (chTreeViewFrame:treeview:HWND,
4381, /* TVM_SETBKCOLOR */
0,
iMyColor).
In definitions section define the following function:
PROCEDURE SendMessageA EXTERNAL "USER32":
DEFINE INPUT PARAMETER h_Widget AS LONG.
DEFINE INPUT PARAMETER i_Message AS LONG.
DEFINE INPUT PARAMETER i_wParam AS LONG.
DEFINE INPUT PARAMETER i_lParam AS LONG.
END PROCEDURE.