Click here to Skip to main content
15,909,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to perform opening a file? Pin
ewighell19-Jul-06 15:16
ewighell19-Jul-06 15:16 
AnswerRe: How to perform opening a file? Pin
Hamid_RT19-Jul-06 19:11
Hamid_RT19-Jul-06 19:11 
QuestionSystem-Wide WriteProcessMemory Hook Pin
capricious_00119-Jul-06 14:16
capricious_00119-Jul-06 14:16 
AnswerRe: System-Wide WriteProcessMemory Hook Pin
Stephen Hewitt19-Jul-06 15:22
Stephen Hewitt19-Jul-06 15:22 
GeneralPreventing the C++ compiler to optimize [solved] [modified] Pin
Jörgen Sigvardsson19-Jul-06 13:14
Jörgen Sigvardsson19-Jul-06 13:14 
QuestionFailed to invoke web services in VC++, please help [modified] Pin
Liu Shuai19-Jul-06 11:38
Liu Shuai19-Jul-06 11:38 
AnswerRe: Failed to invoke web services in VC++, please help Pin
kapil_moondra5-Jan-09 1:25
kapil_moondra5-Jan-09 1:25 
QuestionI hate imagelists!! ( drawing with ILD_TRANSPARENT ) [modified] Pin
Maximilien19-Jul-06 11:23
Maximilien19-Jul-06 11:23 
I kind of hate imagelists.

I'm trying to draw transparent images (without masks) from a CImageList with the ILD_TRANSPARENT ILD_NORMAL parameter and obviously it does not work as intended, because the error is between the chair and the keyboard.

This is how I do it :

My bitmap ( IDR_MAINFRAME ) is a 256 colours bitmap with RGB( 192, 192, 192 ) as the background
colour; the dialog BG colour is RGB( 218, 222, 232 )

void CAboutDlg::OnPaint()
{
 CPaintDC dc(this); // device context for painting
 COLORREF cDialogBG = RGB( 218, 222, 232 );

 CRect rect;
 GetClientRect( rect );
	
 CBrush brush;
 brush.CreateSolidBrush( cDialogBG );
 dc.FillRect( rect, &brush );
 CBitmap bmp;
 bmp.LoadBitmap(IDR_MAINFRAME );

 CImageList imageList;
 imageList.Create(16,15, ILC_COLOR8, 4, 1);
 imageList.SetBkColor(  CLR_NONE );//cDialogBG  );
 imageList.Add(&bmp, RGB( 192, 192, 192 ));

 imageList.Draw( &dc, 0, CPoint( 10, 10 ), ILD_NORMAL );
}


I'm becoming clueless and a bit aggravated because it seems i'm doing all the basics rights, and this should work as advertised.
Frown | :(
Thanks.

( modified because I screwed up my post )
Max.



Maximilien Lincourt
Your Head A Splode - Strong Bad

-- modified at 20:39 Wednesday 19th July, 2006
AnswerRe: I hate imagelists!! ( drawing with ILD_TRANSPARENT ) Pin
led mike19-Jul-06 11:40
led mike19-Jul-06 11:40 
GeneralRe: I hate imagelists!! ( drawing with ILD_TRANSPARENT ) Pin
Maximilien19-Jul-06 14:41
Maximilien19-Jul-06 14:41 
AnswerRe: I hate imagelists!! ( drawing with ILD_TRANSPARENT ) Pin
Michael Dunn19-Jul-06 16:15
sitebuilderMichael Dunn19-Jul-06 16:15 
QuestionIs the microphone in use? Pin
Larsson19-Jul-06 10:35
Larsson19-Jul-06 10:35 
QuestionRe: Is the microphone in use? [modified] Pin
Ali Rafiee19-Jul-06 10:52
Ali Rafiee19-Jul-06 10:52 
QuestionHow can I select a node in a treeview Pin
Alex Cutovoi19-Jul-06 9:08
Alex Cutovoi19-Jul-06 9:08 
AnswerRe: How can I select a node in a treeview Pin
Ali Rafiee19-Jul-06 9:21
Ali Rafiee19-Jul-06 9:21 
GeneralRe: How can I select a node in a treeview [modified] Pin
Alex Cutovoi19-Jul-06 11:18
Alex Cutovoi19-Jul-06 11:18 
GeneralRe: How can I select a node in a treeview Pin
Ali Rafiee19-Jul-06 11:23
Ali Rafiee19-Jul-06 11:23 
GeneralRe: How can I select a node in a treeview Pin
Alex Cutovoi20-Jul-06 2:24
Alex Cutovoi20-Jul-06 2:24 
QuestionSerial Communication with a Garmin Device Pin
dinesh_pam19-Jul-06 8:40
dinesh_pam19-Jul-06 8:40 
QuestionRe: Serial Communication with a Garmin Device Pin
cppcook19-Jul-06 9:02
cppcook19-Jul-06 9:02 
AnswerRe: Serial Communication with a Garmin Device Pin
kitty519-Jul-06 9:11
kitty519-Jul-06 9:11 
GeneralRe: Serial Communication with a Garmin Device Pin
dinesh_pam19-Jul-06 9:29
dinesh_pam19-Jul-06 9:29 
GeneralRe: Serial Communication with a Garmin Device Pin
kitty519-Jul-06 9:45
kitty519-Jul-06 9:45 
GeneralRe: Serial Communication with a Garmin Device Pin
dinesh_pam19-Jul-06 10:06
dinesh_pam19-Jul-06 10:06 
AnswerRe: Serial Communication with a Garmin Device Pin
led mike19-Jul-06 10:33
led mike19-Jul-06 10:33 

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.