In case you didn't get the subject line, here is the problem.

Wrote a simple database application for a lady, and she wanted it to print invoices. No big deal, I didn't know how to do it, but I figured it out.

Then she wanted her logo on it. So I whipped out my trusty friend google, found out how to display a bitmap and la voil*! it worked great.

I printed to Adobe Acrobat files, I used print preview, I even printed a few to the printer and they printed fine, with the logo.

So I take it to deliver it to the lady, everything works great, it shows in its dialog, it shows on the print preview, but when it goes to print, it is completely missing.

I can't find any information about why this is happening. It was the same printer that I delivered to her which had printed just 30 minutes beforehand.

As far as I know the bitmap is stored in the EXE file, which is why it grew so big, but just to make sure I copied the res directory back in, to no effect.

Her computer does not have C++ on it, and possibly s missing some updates, but I don't see why that should matter. We both run windows XP home, so it can't be that.

What is going on?

Here is where I 'injected' the print routine. (The actual print class I made was designed to print columnated text, so printing a picture was a definite after thought)


void CBS_APPView::OnPrint(CDC* pDC, CPrintInfo* pInfo){
if(pInfo->m_nCurPage==1){ //only if on page one
CBitmap bmpLogo;
bmpLogo.LoadBitmap( IDB_BITMAP3 );
BITMAP bm;
bmpLogo.GetObject( sizeof(BITMAP), &bm );
CDC dcMem;
dcMem.CreateCompatibleDC( pDC );
CBitmap* pbmpOld = dcMem.SelectObject( &bmpLogo );
pDC->BitBlt( 350,10, bm.bmWidth, bm.bmHeight,
&dcMem, 0,0, SRCCOPY );
dcMem.SelectObject( pbmpOld );
}

X.OnPrint(pDC, pInfo); //print invoice for this page
CView::OnPrint(pDC, pInfo);
}