²é¿´µ¥¸öÌû×Ó
¾É 2009-05-06, 11:06 PM   #1
yang686526
¸ß¼¶»áÔ±
 
×¢²áÈÕÆÚ: 06-11
Ìû×Ó: 14579
¾«»ª: 1
ÏÖ½ð: 224494 ±ê×¼±Ò
×ʲú: 234494 ±ê×¼±Ò
yang686526 Ïòןõķ½Ïò·¢Õ¹
ĬÈÏ ¡¾×ªÌû¡¿problem while printing

problem while printing ..
problem while printing ..
hello,
i am working in vc++ 6.0 , windows xp professional. ,open design 1.1.12
i created an activex control using mfc activex controlwizard and displayed dwg drawing on the control window using cview. now i want to print this dwg on the
currently installed printer. i already added a method named "dwgprint()" to
the control. i would like to call this method to do the printing.
now, my question is, how can i invoke the printing functions ?
meantime i done the same job in sdi application with the help of odamfcapp
i tried this way ………�
cmyctrl
cmyctrl:: dwgprint()
{
m_pview->myprint();
}
cmyview
cmyview:;myprint()
{
onfileprint();
}
this will goes up to onprepareprint () and show the print dialog too
then shows an runtime error 2147417848(80010108)
hoping to get a reply soon.
thanks in advance.
last edited by jayasankar; 4th august 2005 at 02:38 amfff">.
print functionality doesn't implemented for dwgdirectx.
btw there is dwgdirectx topic for ddx answers.
misha kuzinets
quote:
originally posted by misha kuzinets
print functionality doesn't implemented for dwgdirectx.
btw there is dwgdirectx topic for ddx answers.
thanks for your reply
i think you didn’t get the real scenario
first of all i want to develop an ocx including printing
i am using dwgdirect 1.12. i displayed the dwg file in the ocx with the help of a cview class (namely myview).
i have done the printing as well in a sdi with the help of odamfcapp example.
now i need to implement the same printing process in the ocx that i developed
the main problem that i faced is that i can’t call the cview:nfileprint() in myview.
but this is possible in an sdi app.
hoping to get a reply soon.
thanks in advance.
there are sources of mfc available. did you debug till the place where exception is thrown?
vladimir
quote:
originally posted by wvk
there are sources of mfc available. did you debug till the place where exception is thrown?
yes i did.
exception occurred in cview:nfileprint()
here is the area where the exception thrown
// set up document info and start the document printing process
cstring strtitle;
cdocument* pdoc = getdocument();
if (pdoc != null)
strtitle = pdoc->gettitle();
else
getparentframe()->getwindowtext(strtitle);
exception ,�br /> ---------------------------
microsoft visual c++
---------------------------
unhandled exception in printx.exe (mfc42d.dll): 0xc0000005: access violation.
in the case of sdi app this will executed and the value of strtitle is “Untitle�
i understood that we should include either doc or frame class.
so i include a frame class .and print perfectly
now my question is how can i avoid this frame class?
yang686526ÀëÏßÖÐ   »Ø¸´Ê±ÒýÓôËÌû
GDT×Ô¶¯»¯ÂÛ̳£¨½öÓοͿɼû£©