Click here to Skip to main content
15,891,423 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to convert an array of 32bit integers to image in C++ Pin
su_marvel7-Jul-09 1:54
su_marvel7-Jul-09 1:54 
GeneralRe: How to convert an array of 32bit integers to image in C++ Pin
Code-o-mat7-Jul-09 1:34
Code-o-mat7-Jul-09 1:34 
GeneralRe: How to convert an array of 32bit integers to image in C++ Pin
su_marvel7-Jul-09 3:56
su_marvel7-Jul-09 3:56 
GeneralRe: How to convert an array of 32bit integers to image in C++ Pin
Code-o-mat7-Jul-09 4:01
Code-o-mat7-Jul-09 4:01 
GeneralRe: How to convert an array of 32bit integers to image in C++ Pin
su_marvel7-Jul-09 4:21
su_marvel7-Jul-09 4:21 
GeneralRe: How to convert an array of 32bit integers to image in C++ Pin
Code-o-mat7-Jul-09 4:54
Code-o-mat7-Jul-09 4:54 
GeneralRe: How to convert an array of 32bit integers to image in C++ Pin
su_marvel7-Jul-09 5:06
su_marvel7-Jul-09 5:06 
GeneralRe: How to convert an array of 32bit integers to image in C++ Pin
Code-o-mat7-Jul-09 5:33
Code-o-mat7-Jul-09 5:33 
Well, you were on the right track there with creating the DIB section as you have shwon in your code but you don't need a DC, just feed it NULL there. Once you copied the pixel data into your DIB you can blit it onto a window like any other bitmap. So something like this for example:
void CMyWindow::OnPaint()
{
  CPaintDC dc(this);
  CDC MemDC;
  MemDC.CreateCompatibleDC(dc);
  HBITMAP original_bitmap = (HBITMAP)::SelectObject(MemDC, my_dib_handle);
  dc.BitBlt(0, 0, 1004, 1002, &MemDC, 0, 0, SRCCOPY);
  ::SelectObject(MemDC, original_bitmap);
}


> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <

GeneralRe: How to convert an array of 32bit integers to image in C++ Pin
su_marvel7-Jul-09 22:11
su_marvel7-Jul-09 22:11 
GeneralRe: How to convert an array of 32bit integers to image in C++ Pin
Code-o-mat7-Jul-09 23:31
Code-o-mat7-Jul-09 23:31 
GeneralRe: How to convert an array of 32bit integers to image in C++ Pin
su_marvel8-Jul-09 3:36
su_marvel8-Jul-09 3:36 
GeneralRe: How to convert an array of 32bit integers to image in C++ Pin
Code-o-mat8-Jul-09 5:11
Code-o-mat8-Jul-09 5:11 
GeneralRe: How to convert an array of 32bit integers to image in C++ Pin
su_marvel8-Jul-09 22:21
su_marvel8-Jul-09 22:21 
GeneralRe: How to convert an array of 32bit integers to image in C++ Pin
Code-o-mat8-Jul-09 22:28
Code-o-mat8-Jul-09 22:28 
AnswerRe: How to convert an array of 32bit integers to image in C++ Pin
Adam Roderick J6-Jul-09 5:27
Adam Roderick J6-Jul-09 5:27 
GeneralRe: How to convert an array of 32bit integers to image in C++ Pin
su_marvel7-Jul-09 1:01
su_marvel7-Jul-09 1:01 
QuestionHow to differenciate? Pin
FISH7866-Jul-09 3:20
FISH7866-Jul-09 3:20 
AnswerRe: How to differenciate? Pin
Stuart Dootson6-Jul-09 4:04
professionalStuart Dootson6-Jul-09 4:04 
GeneralRe: How to differenciate? Pin
FISH7866-Jul-09 4:11
FISH7866-Jul-09 4:11 
Questionunknown size of void * Pin
liquid_6-Jul-09 3:02
liquid_6-Jul-09 3:02 
AnswerRe: unknown size of void * Pin
Cedric Moonen6-Jul-09 3:07
Cedric Moonen6-Jul-09 3:07 
AnswerRe: unknown size of void * Pin
Adam Roderick J6-Jul-09 5:33
Adam Roderick J6-Jul-09 5:33 
AnswerRe: unknown size of void * Pin
TheGreatAndPowerfulOz6-Jul-09 10:49
TheGreatAndPowerfulOz6-Jul-09 10:49 
AnswerRe: unknown size of void * Pin
«_Superman_»6-Jul-09 17:21
professional«_Superman_»6-Jul-09 17:21 
QuestionMaking windows clipboard a unicode compatible.. Pin
Rakesh56-Jul-09 3:00
Rakesh56-Jul-09 3:00 

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.