permanent desktop icon text color change
hi
i can change color with
Code:
HWND dh = FindWindow("ProgMan",0);
dh=GetWindow(dh,GW_CHILD);
dh=GetWindow(dh,GW_CHILD);
ListView_SetTextBkColor(dh, CLR_NONE); // icon background to transparent
ListView_SetTextColor (dh, RGB(0,255,0)); // icon text color to rgb()
ListView_RedrawItems (dh, 0, ListView_GetItemCount(dh) - 1); // redraw all icons
everything works fine, but icon background and text color gets back to normal when i refresh desktop(F5), is there a way to change it permanent. Any registry entry where that color is stored?
my program closes itself when it gets the job done, so i cant monitor for desktop refresh and change color then.
Re: permanent desktop icon text color change
ok, now tell me how can i detect desktop refresh ^^, i've been googling for hours with no success
Re: permanent desktop icon text color change
Are you sure that only that "Refresh" command will restore original color?
Anyway, with a help from Spy++ you can see that refresh sends WM_USER+3152 message to the list view.
Now you "only" need to somehow hook into that list's window proc and monitor that message :)
But if you can hook into it - you might also hook into its parent and handle the custom draw messages.
But why would you want to change that color?
Re: permanent desktop icon text color change
How are you setting the icons? Are you using an imagelist? If so, are you using ILC_MASK with ILC_COLOR32 or ILC_COLOR24?
Re: permanent desktop icon text color change
Quote:
Originally Posted by
hoxsiew
How are you setting the icons? Are you using an imagelist? If so, are you using ILC_MASK with ILC_COLOR32 or ILC_COLOR24?
don't know what are you referring to, i am talking about icons on desktop here
Quote:
Originally Posted by
VladimirF
Are you sure that only that "Refresh" command will restore original color?
no, i am not, but its first thing i noticed :)
Quote:
Originally Posted by
VladimirF
But why would you want to change that color?1888644
my wallpaper changes every few hours, and i want black icon font color on light wallpaper and
white font on dark one ^^ ofc. drop shadow is disabled
second thoughts: i will probably stick with drop shadow for now(su.x hard on white background), cause i never played with hooks and dont have much time now
Re: permanent desktop icon text color change
Quote:
Originally Posted by
sv13
don't know what are you referring to, i am talking about icons on desktop here
Oops. For some reason I thought you were dealing with a ListCtrl. I must have confused this with another thread. Sorry.