I'm tasked with maintaining/updating a legacy app that was written in an early version of Powerbuilder. We've upgraded to 2021 and are trying to make some menu modifications with 'Print' and 'Print Preview'.
Currently when hitting 'Print' it fails with "Error opening DLL library pfccom32.dll for external function..." . Tring "Print Preview" does nothing. 'Print Immediate' works fine.
Any workarounds or is it a fools errand?
The scripts are handled through pfc_m_master
SetPointer (hourglass!) of_SendMessage ("pfc_print")
n_cst_menu lnv_menu return lnv_menu.of_sendMessage (this, as_message)
This is a case of "I inherited the project set up this way". Back in the day when there were presentations and classes everywhere for PB, this was the accepted technique for setting up your inheritance path. This allowed the PFC and PFE to be as untouched as possible. Remember that Sybase had control of the Class Libraries back then so this minimized the possibility that a new class library would require you re-code your changes into the PFE.
The code above IS the complete code from my corp_u_dw.pfc_printdlg() event! :) Just copy and paste! Assuming the remainder of the PFC/PFE is relatively untouched, you should be good to run after the paste - and now you will get the Print Dialog boxex you expect.
Our pfe classes are simply renamed pfe classes to include the company name :)