Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Cut, paste and print

Re: Cut, paste and print

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: 8 Oct 2003 05:26:29 -0700
Message-ID: <1a75df45.0310080426.631b08ad@posting.google.com>


v_verno <v_verno_at_tin.it> wrote i

> - cut and paste
> it is not possible to cut characters from a windows application and
> paste them into an input text box in Oracle. Have tried both Ctrl-V
> and mouse right click/etc... but no paste at all. Of course also the
> opposite doesn't work (cut in Oracle, paste in another Win
> application)

Cut-and-paste is a *standard* Windows feature for Windows controls. If the application is using a standard Windows control, cut-and-paste *will* work (unless disabled by the app for things like a password edit box).

When it does not work, it implies one of two things. It is either disabled by the application as I've just mentioned. Or it is *not* a standard Windows control (e.g. a custom developed control or a control that has been subclassed without correctly supporting copy-and-paste methods).

Oh yeah - add 3rd possibility. Security/access control. Copy-and-paste uses the Windows Clipboard feature. It is possible that a Virtual Machine (VM) or application is being run (or is configured) in such a way that it is prevented from successfully using the Clipboard methods. VM's also very often implement their own clipboard system that is local within that VM only.

With Forms and Java - custom controls are used in my experience. Not standard Windows controls.

> - print
> On the toolbar there is a printer icon that should print the image
> of the form currently opened. Unfortunately also this option works
> only on few PCs. When somebody click on the icon nothing happens and
> users do not rcv the standard windows where you can choose the
> printer.

Pardon me for getting technical on you, but I do not know how else to explain what is happening:

Applications use the following Win32 API call to display the printer dialog/selection box:

BOOL PrintDlg(

    LPPRINTDLG lppd // address of structure with initialization data    );

The result says whether or not PrintDlg() was successful.

If not, then a call to CommDlgExtendedError() is in order to determine the exact nature of the failure.

The app is suppose to handle this exception gracefully. For example, if the failure returned by CommDlgExtendedError() is DERR_NODEVICES, it should tell the user "Sorry, you do not have any printers configured on your system".

Ditto for PDERR_PRINTERNOTFOUND. Or PDERR_LOADDRVFAILURE. Each time around displaying a meaningful error message, telling the user *what* went wrong.

The bottomline IMO. The application you are running, does not do this. It gets an error. It ignores the error. It may even not be calling the CommDlgExtendedError() to get the actual exception. Thus you are in the dark as to what went wrong.

> What have noted till now is that :
> - the two problems go together.

The two problems are not related at all from a technical Windows perspective. You deal with different parts of the Win32 API spec. And these API calls are implemented & supported on WinME, WinNT, Win2000 and WinXP. Nor do they share the same DLL or driver.

Clipboard functions are defined in winuser.h

Printer functions are defined in commdlg32.h (requiring commdlg32.lib).

> - have not seen any relation between a/m problems and the software
> installed. PCs are similar but not the same (different versions of
> Win, service packs, version of Office, some PCs now have started using
> Office Outlook,

I doubt that this have anything to do with the problem - unless both the problems you mention are due to dinkum bugs in the Microsoft code that provides that Cliboard and Printer API services.

Which is unlikely. Both these services and APIs have been around for a very long time.

So, amid all this technical stuff, what is the problem and how do you fix it?

Why does it work on one machine and not the other?

Obviously, there are something different that results in different bevahiour.

On the clipboard side. What runtime systems (e.g. Java or Forms) are you using? Are they up to date? Have the latest RTS patches been applied? Are the custom controls being used, correctly registered (these are usually implemented in OCX's and need to be correctly registered in the Registry)? Does copy-and-paste work within the application itself?

On the printer side. With the Oracle App not telling you what is wrong - do you have printers installed on the PCs giving problems? Is there a default printer specified? Is the applicable printer drivers installed?

--
Billy
Received on Wed Oct 08 2003 - 07:26:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US