Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CPrintDialog

Status
Not open for further replies.

grindstonegirl

Technical User
Jun 12, 2003
29
US
Hey
this is a silly question i know but i am simply trying to print a text file from my program. I understand how to bring up the CFileDialog, but i can't figure out how to set the program to print a specific txt file. Any help would be great.
thanks in advance!
 
Yeah I do know about Msdn online. I just have the question how do you know exactly what gets sent to the printer. After reading on this site i am still confused. Everywhere i have looked says to overrid OnPrint(). but when you do this, what command tells the printer what needs to be printed? I just can't seem to find out how something is sent to the printer. thanks
 
What is your background in Windows application development using C/C++?

The CDC pointer parameter of CView::OnPrint() is the device context of the printer. You of course use the DC to paint your printed document, i.e.; CDC::TextOut(..)

This is Windows Programming 101 stuff. If your starting out programming windows in C/C++ i recommend using a beginners book since they cover all these basic fundamental subjects. Trying to piece the vast amount of Windows Programming subjects together from the net or using message based conversations will take a very long time.


-pete
 
I actually found what i was looking for. I understand the OnPrint() stuff. I was having issues with my program and i wasnt doing a very good job of communicating what it was. i'm sorry for my confusing post, but Thanks for your effort in helping me.
 
hi,

To bring PrintSetup u should create an object of,
CPageSetupDialog page;
page.DoModal();

i don't know how u could bring printsetup dislog from CFileDialog ??????

reply
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top