Click here to Skip to main content
15,885,767 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Using Make - text books / references wanted Pin
Richard MacCutchan18-Oct-12 7:10
mveRichard MacCutchan18-Oct-12 7:10 
GeneralRe: Using Make - text books / references wanted Pin
Vaclav_18-Oct-12 7:31
Vaclav_18-Oct-12 7:31 
GeneralRe: Using Make - text books / references wanted Pin
Chris Meech18-Oct-12 8:03
Chris Meech18-Oct-12 8:03 
GeneralRe: Using Make - text books / references wanted Pin
Richard MacCutchan18-Oct-12 23:07
mveRichard MacCutchan18-Oct-12 23:07 
GeneralRe: Using Make - text books / references wanted Pin
Richard MacCutchan18-Oct-12 23:00
mveRichard MacCutchan18-Oct-12 23:00 
AnswerRe: Using Make - text books / references wanted Pin
jschell18-Oct-12 9:31
jschell18-Oct-12 9:31 
GeneralRe: Using Make - text books / references wanted Pin
Vaclav_19-Oct-12 5:53
Vaclav_19-Oct-12 5:53 
QuestionCPrintDialog doesn't see the printer Pin
blackbolek18-Oct-12 3:24
blackbolek18-Oct-12 3:24 
Hi,

I'm developing an MFC application using VS2010.
I noticed that the the printing in my application stopped to work. I reckon that it happened when I moved from VS2005 to VS2010, as it was working fine before.
So the releveant piece of code is here:
C++
CPrintDialog PrintDlg(FALSE, PD_ALLPAGES | PD_USEDEVMODECOPIES | PD_NOPAGENUMS | PD_NOSELECTION | PD_DISABLEPRINTTOFILE, this);
	if(PrintDlg.DoModal() == IDOK) 


When PrintDlg.DoModal() is executed it comes up with this message:
"Before you can perform printer-releted tasks such as page setup or printing a document, you need to install a printer. Do you want to install a printer now?"

When I press the 'Yes' button it comes with another error:
"Windows can't open Add Printer. The local print spooler service is not running. Please restart the spooler or restart the machine"

I have network printer installed as default, and I can print from any other application without a problem.

I'm using Windows 7, but I checked on Windows XP and it comes with the same error.

I tried to swap the above code with:
C++
CPageSetupDialog psd(PSD_INTHOUSANDTHSOFINCHES | PSD_MARGINS | PSD_ENABLEPAGEPAINTHOOK, this);
if(psd.DoModal() == IDOK) 

but it does the same thing.

EDIT:
Actually I run old version of application (compiled with VS2005) and it behaves the same way. So it's not caused by VS2010 after all.


Any ideas?

modified 18-Oct-12 10:00am.

QuestionRe: CPrintDialog doesn't see the printer Pin
David Crow18-Oct-12 7:28
David Crow18-Oct-12 7:28 
AnswerRe: CPrintDialog doesn't see the printer Pin
blackbolek18-Oct-12 22:02
blackbolek18-Oct-12 22:02 
AnswerRe: CPrintDialog doesn't see the printer Pin
Brandon-X1200027-Oct-12 11:34
Brandon-X1200027-Oct-12 11:34 
GeneralRe: CPrintDialog doesn't see the printer Pin
blackbolek29-Oct-12 5:58
blackbolek29-Oct-12 5:58 
QuestionOpening a VC++ project into Adobe Flash Builder Pin
002comp18-Oct-12 3:00
002comp18-Oct-12 3:00 
AnswerRe: Opening a VC++ project into Adobe Flash Builder Pin
Richard MacCutchan18-Oct-12 3:28
mveRichard MacCutchan18-Oct-12 3:28 
QuestionRe: Opening a VC++ project into Adobe Flash Builder Pin
Chris Meech18-Oct-12 8:06
Chris Meech18-Oct-12 8:06 
AnswerRe: Opening a VC++ project into Adobe Flash Builder Pin
002comp18-Oct-12 18:05
002comp18-Oct-12 18:05 
QuestionListView_InsertColumn associated subitem Pin
NoviceEx18-Oct-12 1:32
NoviceEx18-Oct-12 1:32 
AnswerRe: ListView_InsertColumn associated subitem Pin
Richard MacCutchan18-Oct-12 2:54
mveRichard MacCutchan18-Oct-12 2:54 
GeneralRe: ListView_InsertColumn associated subitem Pin
NoviceEx18-Oct-12 3:07
NoviceEx18-Oct-12 3:07 
GeneralRe: ListView_InsertColumn associated subitem Pin
Richard MacCutchan18-Oct-12 3:26
mveRichard MacCutchan18-Oct-12 3:26 
AnswerRe: ListView_InsertColumn associated subitem Pin
Jochen Arndt18-Oct-12 3:42
professionalJochen Arndt18-Oct-12 3:42 
GeneralRe: ListView_InsertColumn associated subitem Pin
Richard MacCutchan18-Oct-12 4:39
mveRichard MacCutchan18-Oct-12 4:39 
QuestionHow to copy map reference Pin
NoviceEx17-Oct-12 22:33
NoviceEx17-Oct-12 22:33 
AnswerRe: How to copy map reference Pin
Richard MacCutchan17-Oct-12 22:58
mveRichard MacCutchan17-Oct-12 22:58 
AnswerRe: How to copy map reference Pin
Stephen Hewitt18-Oct-12 6:30
Stephen Hewitt18-Oct-12 6:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.