Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualprogramering

Posted 10 September 2012 - 12:57 AM

Turns out that I found the documented solution for this problem while goggling once again though I took myself a long time to try looking(through numerous unsuccessive search queries) for it and solving it by myself before starting this topic. So typical. But I'll provide the source for it so that others that might encounter the same problem can benefit from this one:

http://support.microsoft.com/kb/139165 via http://forums.codegu...SetBitmapBits()

Now Solved.

Edit:

Actually the solution will be in this case: (the correct Win32 API call procedures to get ilutWinLoadImage to work)
hdc = GetDC(NULL);   // or: hdc = l_hWndDC;
hdcMem = CreateCompatibleDC(hdc);
hBitmap = ilutWinLoadImage(L"TheImage.bmp",hdc);     // <-- a HDC retrieved by GetDC of your destination DC, Not by CreateCompatibleDC.
SelectObject(hdcMem, hBitmap);

BitBlt(l_hWndDC,100,100,240,40,hdcMem,0,0,SRCCOPY);

// And don't forgetting to release and delete the respective HDC's when done with them.

#3programering

Posted 10 September 2012 - 12:49 AM

Turns out that I found the documented solution for this problem while goggling once again though I took myself a long time to try looking(through numerous unsuccessive search queries) for it and solving it by myself before starting this topic. So typical. But I'll provide the source for it so that others that might encounter the same problem can benefit from this one:

http://support.microsoft.com/kb/139165 via http://forums.codegu...SetBitmapBits()

Now Solved.

Edit:

Actually the solution will be in this case: (the correct Win32 API call procedures to get ilutWinLoadImage to work)
hdc = GetDC(NULL);   // or: hdc = l_hWndDC;
hdcMem = CreateCompatibleDC(hdc);
hBitmap = ilutWinLoadImage(L"TheImage.bmp",hdc);
SelectObject(hdcMem, hBitmap);

BitBlt(l_hWndDC,100,100,240,40,hdcMem,0,0,SRCCOPY);

// And don't forgetting to release and delete the respective HDC's when done with them.

#2programering

Posted 10 September 2012 - 12:45 AM

Turns out that I found the documented solution for this problem while goggling once again though I took myself a long time to try looking(through numerous unsuccessive search queries) for it and solving it by myself before starting this topic. So typical. But I'll provide the source for it so that others that might encounter the same problem can benefit from this one:

http://support.microsoft.com/kb/139165 via http://forums.codegu...SetBitmapBits()

Now Solved.

Edit:

Actually the solution will be in this case: (the correct Win32 API call procedures to get ilutWinLoadImage to work)
[b]hdc[/b] = GetDC(NULL);   // or:  [b]hdc = l_hWndDC[/b];
hdcMem = CreateCompatibleDC(hdc);
hBitmap = ilutWinLoadImage(L"TheImage.bmp",[b]hdc[/b]);
SelectObject(hdcMem, hBitmap);

BitBlt(l_hWndDC,100,100,240,40,hdcMem,0,0,SRCCOPY);

#1programering

Posted 09 September 2012 - 01:53 PM

Turns out that I found the documented solution for this problem while goggling once again though I took myself a long time to try looking(through numerous unsuccessive search queries) for it and solving it by myself before starting this topic. So typical. But I'll provide the source for it so that others that might encounter the same problem can benefit from this one:

http://support.microsoft.com/kb/139165 via http://forums.codeguru.com/showthread.php?506681-How-to-use-Get-SetDIBits()-like-Get-SetBitmapBits()

Now Solved.

PARTNERS