Click here to Skip to main content
15,887,135 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: TCP IP socket goes up and down Pin
Code-o-mat25-Nov-10 7:34
Code-o-mat25-Nov-10 7:34 
GeneralRe: TCP IP socket goes up and down Pin
nahitan25-Nov-10 7:42
nahitan25-Nov-10 7:42 
GeneralRe: TCP IP socket goes up and down Pin
Code-o-mat25-Nov-10 7:48
Code-o-mat25-Nov-10 7:48 
GeneralRe: TCP IP socket goes up and down Pin
Code-o-mat25-Nov-10 7:42
Code-o-mat25-Nov-10 7:42 
QuestionHide Maximize Pin
john563225-Nov-10 2:03
john563225-Nov-10 2:03 
AnswerRe: Hide Maximize PinPopular
Richard MacCutchan25-Nov-10 5:14
mveRichard MacCutchan25-Nov-10 5:14 
QuestionGDI+ SRCAND for Transparency? Pin
tagopi25-Nov-10 0:52
tagopi25-Nov-10 0:52 
AnswerRe: GDI+ SRCAND for Transparency? Pin
Randor 25-Nov-10 4:02
professional Randor 25-Nov-10 4:02 
Hi tagopi,

I would suggest that you have a look at the SetColorMatrix function[^] which can be used for RGBA transformations. Here is an example from one of my personal projects:

C++
if(TRUE == m_bDisabled)
{
	Gdiplus::ImageAttributes imageAtt;
	Gdiplus::ColorMatrix cm =
	{
		0.299f, 0.299f, 0.299F, 0, 0,
		0.587f, 0.587f, 0.587f, 0, 0,
		0.114F, 0.114F, 0.114F, 0, 0,
		0.0f, 0.0f, 0.0f, 1.0f, 0.0f,
		0.0f, 0.0f, 0.0f, 0.0f, 1.0f
	};
	cm.m[3][3]+=0.01f;
	imageAtt.SetColorMatrix(&cm, Gdiplus::ColorMatrixFlagsDefault,Gdiplus::ColorAdjustTypeBitmap);
	gScreenBuffer.DrawImage(&memBitmap,Gdiplus::Rect(0, 0, memBitmap.GetWidth(), memBitmap.GetHeight()),0,0,memBitmap.GetWidth(),memBitmap.GetHeight(),Gdiplus::UnitPixel,&imageAtt);
}


This example is used to paint my bitmap in grayscale when a button is disabled.

Good Luck,
-David Delaune
GeneralRe: GDI+ SRCAND for Transparency? Pin
tagopi25-Nov-10 19:23
tagopi25-Nov-10 19:23 
GeneralRe: GDI+ SRCAND for Transparency? Pin
tagopi8-Dec-10 19:14
tagopi8-Dec-10 19:14 
QuestionGetting Raw USB Keyboard input in C++ Pin
mark856925-Nov-10 0:46
mark856925-Nov-10 0:46 
AnswerRe: Getting Raw USB Keyboard input in C++ Pin
CPallini25-Nov-10 1:02
mveCPallini25-Nov-10 1:02 
AnswerRe: Getting Raw USB Keyboard input in C++ Pin
Randor 25-Nov-10 3:55
professional Randor 25-Nov-10 3:55 
QuestionHow to add CRecordset derived class in VC++ 2008 Pin
eyalle24-Nov-10 23:25
eyalle24-Nov-10 23:25 
AnswerRe: How to add CRecordset derived class in VC++ 2008 Pin
Dudi Avrahamov27-Nov-10 22:01
Dudi Avrahamov27-Nov-10 22:01 
QuestionUser Mode vs Kernel Mode Pin
msr_codeproject24-Nov-10 18:26
msr_codeproject24-Nov-10 18:26 
AnswerRe: User Mode vs Kernel Mode Pin
yu-jian24-Nov-10 22:21
yu-jian24-Nov-10 22:21 
GeneralRe: User Mode vs Kernel Mode Pin
Sauro Viti24-Nov-10 23:17
professionalSauro Viti24-Nov-10 23:17 
AnswerRe: User Mode vs Kernel Mode Pin
Richard MacCutchan24-Nov-10 22:41
mveRichard MacCutchan24-Nov-10 22:41 
QuestionProblems with other people's Vista! Pin
Member 86892624-Nov-10 5:46
Member 86892624-Nov-10 5:46 
AnswerRe: Problems with other people's Vista! Pin
Maximilien24-Nov-10 7:38
Maximilien24-Nov-10 7:38 
AnswerRe: Problems with other people's Vista! Pin
Code-o-mat24-Nov-10 22:35
Code-o-mat24-Nov-10 22:35 
AnswerRe: Problems with other people's Vista! Pin
Member 86892629-Nov-10 10:42
Member 86892629-Nov-10 10:42 
AnswerRe: Problems with other people's Vista! Pin
Chuck O'Toole29-Nov-10 11:28
Chuck O'Toole29-Nov-10 11:28 
AnswerRe: Problems with other people's Vista! Pin
Member 8689262-Dec-10 6:17
Member 8689262-Dec-10 6:17 

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.