Anyone else unable to print bitmaps on docs sent to a printer?

Henry, Shawn 11 Reputation points
2021-03-11T20:16:00.653+00:00

Is anyone else having trouble getting bitmaps to print on documents sent to a printer? I was working on some code yesterday, and it was working just fine. This morning however, it simply stopped working, without making any code changes (was continuing my validation testing). I went back to some older projects that use the same method for printing and now they aren't working either. I have about 5 or 6 applications which perform a similar print operation, and every one I've tested seems to no longer be working. I'm beginning to think something changed in the OS, as these applications which have been working reliably for years just stopped working today. Using CDC for printing, with a bitmap included as a resource in my project. Here's the code: CBitmap BmpCusomterLogo; CDC MemDC; // Load the bitmap from the resource BmpCusomterLogo.LoadBitmap( IDB_BITMAP1 ); // Create a memory device compatible with the above CPaintDC variable MemDC.CreateCompatibleDC( pDC ); // Select the new bitmap CBitmap *BmpPrevious = MemDC.SelectObject( &BmpCusomterLogo ); // Copy the bits from the memory DC into the current dc pDC->BitBlt(1480, 400, 1800, 364, &MemDC, 0, 0, SRCCOPY ); // Restore the old bitmap pDC->SelectObject( BmpPrevious );

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,620 questions
{count} votes

6 answers

Sort by: Most helpful
  1. krcma96 1 Reputation point
    2021-04-09T21:43:49.343+00:00

    It seems to be working now for me, I'm not sure which windows update fixed it but it works fine now.

    0 comments No comments