|
-
October 18th, 2009, 07:15 AM
#1
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.
-
October 20th, 2009, 01:30 PM
#2
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
-
October 20th, 2009, 03:56 PM
#3
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?
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio:
FeinWindows - replacement windows manager for Visual Studio, and more...
-
October 20th, 2009, 10:21 PM
#4
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?
-
October 21st, 2009, 05:24 AM
#5
Re: permanent desktop icon text color change
 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
 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 
 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
-
October 21st, 2009, 08:17 AM
#6
Re: permanent desktop icon text color change
 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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|