🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.win32
Article #2179

Re: Clipboard "delayed rendering"

#2179
From: Chris Thornton
Date: Sun, 01 Feb 1998 00:00
55 lines
3330 bytes
Jon,
If there are any clipboard utilities installed, such as my own ClipMate,
they'll ask for the data as soon as its posted.  You'll get the same
behavior as if you were running clipbrd.exe, which auto-pastes everything
into itself.
But wait, you say.  You're not running any clipboard viewers?  Ha!
Some applications, for apparently no good reason, paste TEXT into themselves
so that they can light up their menus and toolbar buttons.  It should be
enough that they just query the clipboard to see if CF_TEXT is available,
but certain apps don't stop there.  They are looking for TEXT with a
particular structure to it, such as to see if the text contains things
they're interested in.  Such as decriptions of forms, buttons, and other
controls....

Yes, you're likely being burned by Delphi3 or Delphi2.  And so have I.
They both auto-paste CF_TEXT into themselves, and I'd suspect other Borland
development environments do so as well.

Rather than using delayed rendering, maybe you should just do nothing until
the user clicks?  Otherwise, if you're auto-pasting all text into yourself,
then you're setting yourself up for "wars" with any clipboard enhancement
utilities out there.

I'd just sit idle, until the user clicks.  Then, grab the data, and flip
your icon to a "busy" state.  When done, give a little beep, flip your to
"done", put your data onto the clipboard, and then the user can paste.

Good Luck,
Chris

Jon Shemitz wrote in message <34D40BE9.1B4DD708@midnightbeach.com>...
>I've spent longer than I should on a little tray app that reads source
>code from the clipboard and writes it back, syntax highlighted, in HTML
>and RTF. Because it's very slow (rendering a mere 44K of source takes ca
>a minute on a P90), I decided to implement "delayed rendering". When the
>user double clicks on the tray icon, the app parses the source to a
>global token list, and puts a NULL on the clipboard in CF_TEXT and "Rich
>Text Format". Then, when the user tries to paste plain text, the app
>renders HTML; when the user tries to paste rich text, the app renders
>RTF.
>
>Thing is, I get a WM_RENDERFORMAT request for the CF_TEXT format as soon
>as I call CloseClipboard().
>
>Is this 'by design' and unavoidable? Or is there some way I can force
>Windows to delay rendering the CF_TEXT until it's requested, too?
>
>The MSDN CD doesn't seem to say anything about "delayed rendering"
>that's not in the SDK help files ....
>
>--
>
>http://www.midnightbeach.com - for info about me, my work, my writing,
>                               and my homeschool resource pages.
Technical Details
Message-ID: <6b227k$3vu3@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <34D40BE9.1B4DD708@midnightbeach.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1091e5,172a182732b08709
X-Google-Attributes: gid1091e5,public
X-Google-Thread: 113dfb,172a182732b08709
X-Google-Attributes: gid113dfb,public
X-Google-Thread: f5ca7,172a182732b08709
X-Google-Attributes: gidf5ca7,public
From: "Chris Thornton" <chris@thornsoft.com>
Subject: Re: Clipboard "delayed rendering"
Date: 1998/02/01
Message-ID: <6b227k$3vu3@forums.borland.com>
X-Deja-AN: 321089323
References: <34D40BE9.1B4DD708@midnightbeach.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Organization: None
Newsgroups: comp.os.ms-windows.programmer.win32,borland.public.cppbuilder.winapi,borland.public.delphi.winapi