HTML reporting system for FIVEWIN

Re: HTML reporting system for FIVEWIN

Postby Otto » Mon Jun 14, 2021 12:42 pm

Hello Leandro,
Yes.
Practically everything works that InterNetexplorer supports.
I think it's a good option for printing.

I am currently converting some reports in my program WINHOTEL to HTML.
Unfortunately, I started with a report in landscape format.
Here I is the problem that you have to switch the printer to landscape before printing.
Fivewin only seems to switch the printer for the APP that is currently in use. But when we call ActiveX for printing, we have an extra program.
I hope Antonio and Mr. Rao will find a solution.

Or maybe the
Curso de C para programadores Harbour can program a solution.


I'm experimenting with a command line utility.
For in house I installed the printer with landscape default a second time.

Best regards,
Otto




https://www.amyuni.com/forum/viewtopic.php?t=1224


Code: Select all  Expand view

Once the DEVMODE structure has been modified to suit our configuration, we can either create a
printer device context using the CreateDC API call:

Code: Select all

HDC hDC = CreateDC( _T( "winspool" ), szPrinter, NULL, lpDevMode );

Or make this configuration as the default for this printer and for all applications using this printer.

Code: Select all

DWORD dw;
PRINTER_INFO_2 *pi2;
// get default printer info structure which contains the DEVMODE
GetPrinter( m_hPrinter, 2, NULL, 0, &dw );
pi2 = (PRINTER_INFO_2 *)GlobalAllocPtr( GHND, dw );
GetPrinter( m_hPrinter, 2, (LPBYTE)pi2, dw, &dw );
// set the new printer info structure
pi2->pDevMode = lpDevMode;
SetPrinter( m_hPrinter, 2, (LPBYTE)pi2, 0 );
GlobalFreePtr( pi2 );
// notify applications that the default DEVMODE has changed
SendMessageTimeout( HWND_BROADCAST, WM_DEVMODECHANGE, 0, (LPARAM)szPrinter,
SMTO_NORMAL, 1000, NULL );
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 61 guests