If I understand what you are doing, problem is that you can't "write" picture into page. Pictures are NOT part of the page. What you need to do is generate your .jpg file on server, and using ajax set the image source to something like <img src="givemepicture.aspx?picture" /> And givemepicture.aspx will write your image (probably generated using parameters passed in url) into its response. I don't know if the browser will automaticaly reload image after you change it's src with javascript.
[My Blog]
"Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
maybe a silly answer.. but maybe your printer driver has got gray-scale set as default? check out the DEVMODE -structur (membervar in CPrintDlg). It has a member dmColor. It can be set to DMCOLOR_COLOR or DMCOLOR_MONOCHROME. Set it correctly and it should work.
CPrintDialog dlg;
m_DC = new CDC;
// Attach a printer DC
m_DC->Attach(r_printdlg.GetPrinterDC());
m_DC->m_bPrinting = TRUE;
DEVMODE* pDevMode = r_printdlg.GetDevMode();
pDevMode->dmColor = DMCOLOR_COLOR;
m_DC->ResetDC (pDevMode);
Maybe this works..
"I'm from the South Bronx, and I don't care what you say: those cows look dangerous."
U.S. Secretary of State Colin Powell at George Bush's ranch in Texas
My be due to passing the object by value rather than reference (but no promises!) Try : GenerateReport **ByRef** rs "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox
You should be able to catch the combo box messages inside your frame class just like any other menu/toolbar message. You may not be able to use ClassWizard to do it, so you might have to edit the code manually. Hope this helps,
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
what is the value and datatype of szTemp? What amount of physical memory available at the moment of the error? What is the page file size? What is the error number?
Handle WM_CTLCOLORBTN and in your handler, call SetBkMode(TRANSPARENT) on the HDC that is passed in the message's wParam. --Mike-- THERE IS NO THERE IS NO BUT THERE IS MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT :bob: Homepage | RightClick-Encrypt | 1ClickPicGrabber "Which comes first, the bug or the stress?" -- Chris Maunder