Click here to Skip to main content
15,896,154 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DrawThemeIcon Pin
JBoschen26-Aug-04 8:06
JBoschen26-Aug-04 8:06 
GeneralRe: DrawThemeIcon Pin
Jörgen Sigvardsson26-Aug-04 9:25
Jörgen Sigvardsson26-Aug-04 9:25 
GeneralRe: DrawThemeIcon Pin
JBoschen26-Aug-04 9:28
JBoschen26-Aug-04 9:28 
GeneralRe: DrawThemeIcon Pin
Jörgen Sigvardsson26-Aug-04 9:32
Jörgen Sigvardsson26-Aug-04 9:32 
GeneralRe: DrawThemeIcon Pin
JBoschen26-Aug-04 9:46
JBoschen26-Aug-04 9:46 
GeneralRe: DrawThemeIcon Pin
Jörgen Sigvardsson26-Aug-04 9:53
Jörgen Sigvardsson26-Aug-04 9:53 
GeneralRe: DrawThemeIcon Pin
cmk26-Aug-04 11:51
cmk26-Aug-04 11:51 
GeneralRe: DrawThemeIcon Pin
Jörgen Sigvardsson26-Aug-04 12:02
Jörgen Sigvardsson26-Aug-04 12:02 
Thanks for the 2 formulas, highly appreciated! I will test them both. Just for fun Big Grin | :-D


cmk wrote:
As you've found there are articles here on how to access/change the pixel values in a bitmap.

I did find a function on the net earlier today which transforms an icon into a gray scale icon. I used the function and instered the gray scale icon into an image list. Unfortunately, the image list just wouldn't accept the icon's mask! I used PJ Arend's excellent icon/bitmap/dc debugger, and found that the icon renders perfectly when using DrawIcon. Unfortunately, when using the image list (which I added using ImageList_AddIcon), the mask wasn't used, which resulted in blackness instead of transparency. I used ILD_TRANSPARENT when I drew the icon - which works perfectly for "unmodified" icons. The function which transformed the icon into a grayscale icon looked correct: it saved the mask, and modified each pixel using a formula similar to what you describe above. Then recreated the icon using the image bitmap and saved mask. Confused | :confused:

--
...Coca Cola, sometimes war...
GeneralRe: DrawThemeIcon Pin
cmk26-Aug-04 14:43
cmk26-Aug-04 14:43 
GeneralRe: DrawThemeIcon Pin
Jörgen Sigvardsson27-Aug-04 3:54
Jörgen Sigvardsson27-Aug-04 3:54 
GeneralRe: DrawThemeIcon Pin
KaЯl29-Aug-04 22:28
KaЯl29-Aug-04 22:28 
GeneralNo hWnd for Class derived from CEdit Pin
BlackDice26-Aug-04 4:43
BlackDice26-Aug-04 4:43 
GeneralRe: No hWnd for Class derived from CEdit Pin
KaЯl27-Aug-04 4:57
KaЯl27-Aug-04 4:57 
GeneralRe: No hWnd for Class derived from CEdit Pin
BlackDice27-Aug-04 5:41
BlackDice27-Aug-04 5:41 
GeneralRe: No hWnd for Class derived from CEdit Pin
KaЯl27-Aug-04 6:02
KaЯl27-Aug-04 6:02 
GeneralRe: No hWnd for Class derived from CEdit Pin
BlackDice27-Aug-04 6:24
BlackDice27-Aug-04 6:24 
GeneralRe: No hWnd for Class derived from CEdit Pin
KaЯl27-Aug-04 6:47
KaЯl27-Aug-04 6:47 
GeneralRe: No hWnd for Class derived from CEdit Pin
BlackDice27-Aug-04 7:51
BlackDice27-Aug-04 7:51 
Questionmfc newbie, when do i paint? Pin
evilslope26-Aug-04 4:19
evilslope26-Aug-04 4:19 
AnswerRe: mfc newbie, when do i paint? Pin
Maximilien26-Aug-04 4:39
Maximilien26-Aug-04 4:39 
AnswerRe: mfc newbie, when do i paint? Pin
palbano26-Aug-04 5:02
palbano26-Aug-04 5:02 
GeneralRe: mfc newbie, when do i paint? Pin
jmkhael26-Aug-04 6:04
jmkhael26-Aug-04 6:04 
AnswerRe: mfc newbie, when do i paint? Pin
Michael Dunn26-Aug-04 8:59
sitebuilderMichael Dunn26-Aug-04 8:59 
GeneralBorder look&feel with Windows XP Pin
Jean-Michel LE FOL26-Aug-04 4:04
Jean-Michel LE FOL26-Aug-04 4:04 
Generalbsearch function Pin
ValRUB26-Aug-04 3:44
ValRUB26-Aug-04 3:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.