OpenPrinter call from Visual C++ MFC app

OpenPrinter call from Visual C++ MFC app

Post by Branch System » Fri, 27 Jul 2001 16:38:02

I am trying to get the default printer settings; change the paper source to
tray 1(upper); and print.
All the code excerpts I have seen refer to OpenPrinter and
Fine, I code the appropriate code and get error messages:
OpenPrinter is not a member of global namespace ''
DocumentProperties is not a member of global namespace ''

I am calling OpenPrinter as '::OpenPrinter(......'

Any help or suggestions would be gratefully appreciated.


1. UDP app in Visual C++ and MFC?

Help.  I am trying to write a simple UDP server in Visual C++ 4.0.  I have
created a class based on CAsyncSocket and overridden the
CAsyncSocket::OnReceive function to call a function in my Document class.  I
then call MySock->Receive(), but I am not getting any data.  The BytesRecieved
returned by the Receive function is always zero.  

I have just started to delve into this field, and all of the sample code with
VC++ is all TCP oriented, using CSocket and CArchive.  This does not help me
as it is stated in the help files that CSocket/CArchive can only be used in
STREAM SOCKETS, therefore no UDP allowed.

Any help, or even sample code would be much appreciated.

Paul Meisner.

2. Can't install any fixpak

3. Free MFC Source Code Form++ Library(Visual C++,MFC)

4. shell -- sending a simple text file email message with a shell command? (newbie)

5. Visual C++/MFC vs. Visual Basic

6. Toaster 4000 + 3.1 software

7. Calling a Visual Basic ActiveX DLL from Visual C++


9. Calling Visual Basic From Visual C++

10. Call Visual C++ DLL from Visual Basic. How???


12. C++ Graphics Using Visual C++ Console APP

13. OpenPrinter call fails