I'm using custom formatting string with tabulators and colors ($tab(), $rgb()). I use owner-drawing on my DropDown List. Here is part of the code:
lpdis = (LPDRAWITEMSTRUCT) lparam;
DWORD defaultColor =
GetSysColor(lpdis->itemState & ODS_SELECTED ?
COLOR_HIGHLIGHTTEXT : COLOR_WINDOWTEXT);
.
.
.
uTextOutColorsTabbed(lpdis->hDC,
formatted_titles[lpdis->itemID],
infinite, &(lpdis->rcItem), 2, &(lpdis->rcItem),
lpdis->itemState & ODS_SELECTED,
defaultColor,
true);
formatted_titles[n] is where I store my formatted string, for example:Text_In_Default_Color $rgb(0,255,0) Text_In_Green $tab() RALIGN
The problem is: when the item is not selected - everything is OK. But, when the item is selected, then uTextOutColorsTabbed seems to ignore my defaultColor value and displays text (Text_In_Default_Color here) in black. There is no problem, when I set (BOOL) selected parameter to false (but then the selected color from $rgb(x,y,z,s_x,s_y,s_z) is ignored...)
Am I missing something?...
PS. What is the (BOOL) use_columns parameter for? I can't see the difference when using it or not.