Just a very simple and probably stupid sounding 'newbie' question, but I seem to be stuck on this.
SENDMESSAGE win.hWnd,0x1026,0,0xFCDC3B,12:'Set text background colour
is not producing the results I expect. (That is not the right color)
I am unclear about using the hex code to set the colors in the above line.
I am changing the hex code which is the penultimate parameter. LPARAM (eg 0xFDC3B) using hex color codes I found on a website. But I am not getting the color I expect .
Using the syntax for SendMessage: UINT = SENDMESSAGE(win as ANYTYPE, msg as UINT, wparam as UINT,lparam as ANYTYPE,OPT id=0 as UINT), I must admit I don't understand what data is being passed in the msg (0x1026) or which parameter the 0 following is either. Are these parameters affecting the color I get with the Lparam, which I assume is the color, or am I just using the wrong hex codes?
Could someone point me to where I could read more about this to arrive at an understanding of what is happening here?
Thanks,
What kind of control is 12, the control you are trying to change the background color of?
I don't know where you got your hex number from but try changing 0xFCDC3B to 0x3BDCFC and see if you get the color you want.
This should explain the 1026 at least.
/* Set text colour */
SENDMESSAGE d1.hWnd,0x1024,0,0x000000,D1_LV
/* Set text background colour */
SENDMESSAGE d1.hWnd,0x1026,0,0xFFDF00,D1_LV
/* Set background colour */
SENDMESSAGE d1.hWnd,0x1001,0,0xF78000,D1_LV
Text color = 1024, text background = 1026 and background color = 1001.
Bill
Thanks both Larry and Bill. The control is a Listview and I am simply trying to modify what I think is Bill's csv file reader. I see how the wparam and lparams work now....