cwilliso
asked on
Print Screen FCN in Borland C++ Builder
My users requested a screen print function in the Application that I created for them. How can
I implement this??
I implement this??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>Can't find a Property or Method to get the DC of the printer.
Look into the Win32 SDK sample "Printer: Printing". The Printer sample shows how to print using both the CreateDC and the PrinterDlg methods for acquiring a printer HDC.
>How to send a WM_PRINT message to the main application window?
It is just like a normal message. Use PostMessage or SendMessage with the window handle, HDC and the flags.
Look into the Win32 SDK sample "Printer: Printing". The Printer sample shows how to print using both the CreateDC and the PrinterDlg methods for acquiring a printer HDC.
>How to send a WM_PRINT message to the main application window?
It is just like a normal message. Use PostMessage or SendMessage with the window handle, HDC and the flags.
ASKER
The actual answer is:
this->Print();
this->Print();
I am not familiar with Borland C++ Builder. But I am sure this->Print() actually sends the WM_PRINT message. MFC also has a member function CWnd::Print, which wraps the WM_PRINT message.
ASKER
print out the application's client area. I don't have much time, unfortunately.
Can't find a Property or Method to get the DC of the printer. How to send a WM_PRINT
message to the main application window?