Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 15 MAR 2002 08:54:35AM Colin Rule wrote:

I have made a copy of the PrintSetup form and associated events from SYSPROG to my application.

This was so that I could have specific printer setups for my application rather than the user having to change the default printer on the system each time. This is in fact no different than is handled in Word etc.

The problem is that when the user clicks the Options button, the printer driver options that display are for the System default printer and not for the application specific printer.

It seems that this is handled by a call to 'SetupP'.

QUESTION: How to we advise SetupP what printer to use?

These are the relevant subroutines

*

* set the default printer

*

Set:

if assigned(p1) then
  Current=p1

* WritePrivateProfileString(DFT_SECTION$, DFT_KEY$, Current: \00\, INI_FILE$)

  WritePrivateProfileString(DFT_SECTION$, DFT_KEY$, Current: \00\, CSSP_FILE$)
  SendMessage(HWND_BROADCAST$, WM_WININICHANGE$, 0, 0)
  Ret=TRUE$
end else
  Ret=FALSE$
end

return

* * printer configuration options *

Options:

hWnd=Get_Property(@window, "HANDLE")
Set_Property("SYSTEM", "BLOCK_EVENTS", TRUE$)
SetupP(hWnd)
Set_Property("SYSTEM", "BLOCK_EVENTS", FALSE$)

return

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/bcc9e217d12aacf088256b7d0046ea80.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1