Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #6861

Re: cDeviceName _WINDEVMODE update printer name BYTE ARRAY

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Urs Eggmann" <Urs.Eggmann@shinternet.ch>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: cDeviceName _WINDEVMODE update printer name BYTE ARRAY
Date Mon, 19 May 2014 12:26:38 +0200
Lines 61
Message-ID <btu4jaF50jsU1@mid.individual.net> (permalink)
References <314b509e-bd05-40ce-a0f3-3327e750f6b1@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding 8bit
X-Trace individual.net UoZBNQ6fZ4EAH6ZNnsWu1gNKxzW2CKBh9UWQnupJVGxJWbis8k
Cancel-Lock sha1:hbUDbFillHSqVtE9Ne1cgQvjZ0c=
X-Priority 3
X-MSMail-Priority Normal
X-Newsreader Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.6157
Xref csiph.com comp.lang.clipper.visual-objects:6861

Show key headers only | View raw


Hi Phil,

If the German comments are a problem, let me know, I'll translate.
On the homepge www.voug-bodensee.net under Downloads - Drucker.zip you can 
find a demo App.
regards
Urs


METHOD FilePrinterSetup() CLASS AppShell
LOCAL structDevMode AS _WINDEVMODE
LOCAL nZaehler AS DWORD
LOCAL cDruckerName AS STRING
cDruckerName := goIniFile:GetString ("SETTINGS" , "DRUCKER")
// Der Name des Druckers wird aus der INI geholt. Ist der String leer oder 
ungültig,
// wird im oPrintingDevice:SetUp() der Standarddrucker angeboten.
structDevMode := SELF:oPrintingDevice:GetDevMode() // Die Struktur DevMode 
holen

// Das eigentliche Kernstück. Im ersten Element der Struktur DevMode wird 
der Name "eingefüllt"
FOR nZaehler = 1 TO CCHDEVICENAME
structDevMode.dmDeviceName[nZaehler] := Asc( SubStr(cDruckerName , nZaehler 
, 1 ) )
NEXT nZaehler

// Mit dieser modifizierten Struktur wird nun der SetUp-Dialog geöffnet.
IF SELF:oPrintingDevice:Setup()
goIniFile:WriteString("SETTINGS" , "DRUCKER" , SELF:oPrintingDevice:Device )
goIniFile:WriteInt("SETTINGS" , "PAPIERFACH" , 
structDevMode.dmDefaultSource )
goIniFile:WriteInt("SETTINGS" , "PAPIERFORMAT" , structDevMode.dmPaperSize )
ENDIF
RETURN NIL
"Sherlock" <sherlock@sherlock.com.au> schrieb im Newsbeitrag 
news:314b509e-bd05-40ce-a0f3-3327e750f6b1@googlegroups.com...
> Hi
>
> LOCAL structDevMode  AS _WINDEVMODE
>
> structDevMode  := SELF:oPrinter:oPRNDev:GetDevMode()
> FOR xx := 1 TO CCHDEVICENAME
>   cDeviceName += CHR(structDevMode.dmDevicename[xx])
> NEXT
> // Lets say cDeviceName = "BullZIP printer"
>
> If I wanted to change the name to "HP printer" how would I convert/ write 
> this printer name which is a string to BYTE ARRAY
>
>
> structDevMode.dmDevicename := ????
>
>
> SELF:oPrinter:oPRNDev:UpdateDevMode()
>
>
> Thanks in advance..
>
> Phil 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

cDeviceName  _WINDEVMODE update printer name BYTE ARRAY Sherlock <sherlock@sherlock.com.au> - 2014-05-18 16:43 -0700
  Re: cDeviceName  _WINDEVMODE update printer name BYTE ARRAY "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2014-05-19 12:26 +0200
    Re: cDeviceName  _WINDEVMODE update printer name BYTE ARRAY Sherlock <sherlock@sherlock.com.au> - 2014-05-19 07:04 -0700
      Re: cDeviceName _WINDEVMODE update printer name BYTE ARRAY "Uwe Heyer" <uwe.heyer@aristik.de> - 2014-05-21 17:28 +0000
        Re: cDeviceName _WINDEVMODE update printer name BYTE ARRAY "Uwe Heyer" <uwe.heyer@aristik.de> - 2014-05-21 18:08 +0000

csiph-web