Click here to Skip to main content
16,006,531 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow move a CListCtrl item?! Pin
XAlien12-Dec-01 11:23
XAlien12-Dec-01 11:23 
AnswerRe: How move a CListCtrl item?! Pin
Thomas Blenkers14-Dec-01 0:21
Thomas Blenkers14-Dec-01 0:21 
GeneralOne more question about CreateProcess, etc Pin
12-Dec-01 11:10
suss12-Dec-01 11:10 
GeneralRe: One more question about CreateProcess, etc Pin
Bill Wilson12-Dec-01 13:04
Bill Wilson12-Dec-01 13:04 
GeneralRe: One more question about CreateProcess, etc Pin
13-Dec-01 5:25
suss13-Dec-01 5:25 
GeneralNewbie Image Help Pin
Jerry Wang12-Dec-01 8:50
Jerry Wang12-Dec-01 8:50 
GeneralRe: Newbie Image Help Pin
Christian Graus12-Dec-01 10:17
protectorChristian Graus12-Dec-01 10:17 
GeneralRe: Newbie Image Help Pin
12-Dec-01 12:38
suss12-Dec-01 12:38 
Thank you Christian for the tip. I found a DIBSection wrapper in Code Project, but the image still does not display properly with 16-bit color depth monitor setting.

I think it's because I am creating a bitmap wrong. Can you please take a look at the following:

*imageBuffer points to my image array BGRxBGRxBGRx...
<br />
	bitmapBefore.CreateBitmap(sizeBefore.cx, sizeBefore.cy, 1, 32, imageBuffer);<br />


And then I display the bitmapBefore in my view.

This is what I did before in view:
<br />
	CBitmap *bitmap = &(pDoc->bitmapBefore);<br />
	dcTemp.CreateCompatibleDC(&cDC);<br />
	dcTemp.SelectObject(bitmap);<br />
	cDC.BitBlt(0,0, pDoc->sizeAfter.cx, pDoc->sizeBefore.cy,<br />
			   &dcTemp, 0, 0, SRCCOPY);<br />
<br />


and this is what I changed w/ DIBSection wrapper:

<br />
	CBitmap *bitmap = &(pDoc->bitmapBefore);<br />
	CDIBSectionLite dibsection;<br />
	dibsection.SetBitmap(*bitmap);<br />
	dibsection.Draw(&cDC, CPoint(0,0));<br />


They give the same results... Whenever I set my screen color depth to anything other than True Color (32bit), I get white surface. Can you spot what I'm doing wrong?

Thanks for your help!

Jerry
GeneralRe: Newbie Image Help Pin
Christian Graus12-Dec-01 13:12
protectorChristian Graus12-Dec-01 13:12 
GeneralRe: Newbie Image Help Pin
Joaquín M López Muñoz12-Dec-01 11:55
Joaquín M López Muñoz12-Dec-01 11:55 
GeneralRe: Newbie Image Help Pin
12-Dec-01 12:53
suss12-Dec-01 12:53 
GeneralRe: Newbie Image Help Pin
Christian Graus12-Dec-01 13:18
protectorChristian Graus12-Dec-01 13:18 
GeneralRe: Newbie Image Help Pin
13-Dec-01 12:11
suss13-Dec-01 12:11 
QuestionHow to launch an executable directly from memory? Pin
John Osborn12-Dec-01 8:39
John Osborn12-Dec-01 8:39 
AnswerRe: How to launch an executable directly from memory? Pin
Joaquín M López Muñoz12-Dec-01 9:22
Joaquín M López Muñoz12-Dec-01 9:22 
GeneralRe: How to launch an executable directly from memory? Pin
John Osborn12-Dec-01 13:26
John Osborn12-Dec-01 13:26 
GeneralIs it possible to change bmp in executable Pin
SAK12-Dec-01 7:36
SAK12-Dec-01 7:36 
GeneralRe: Is it possible to change bmp in executable Pin
Rick York12-Dec-01 7:58
mveRick York12-Dec-01 7:58 
GeneralRe: Is it possible to change bmp in executable Pin
Ernest Laurentin12-Dec-01 7:59
Ernest Laurentin12-Dec-01 7:59 
GeneralRe: Is it possible to change bmp in executable Pin
Alvaro Mendez12-Dec-01 8:06
Alvaro Mendez12-Dec-01 8:06 
GeneralProblem with ActiveX Pin
12-Dec-01 7:00
suss12-Dec-01 7:00 
GeneralRe: Problem with ActiveX Pin
Ernest Laurentin12-Dec-01 8:32
Ernest Laurentin12-Dec-01 8:32 
GeneralRe: Problem with ActiveX Pin
13-Dec-01 5:38
suss13-Dec-01 5:38 
GeneralRe: Problem with ActiveX Pin
Ernest Laurentin13-Dec-01 5:51
Ernest Laurentin13-Dec-01 5:51 
GeneralRe: Problem with ActiveX Pin
13-Dec-01 6:19
suss13-Dec-01 6:19 

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.