Clipboard question... CF_...what?

Hi,


I understand this information is all out there, but it's all a bit confusing
and I never know for sure when I read about it...

I had a non-Unicode application and copied/pasted to/from the clipboard
through CF_TEXT which went all fine. Now I moved to Unicode and need to
update my copy/paste routines. I implemented copy and paste for
CF_UNICODETEXT.

But I have some questions:

1. When I look in the DataObject Viewer I sometimes see only CF_OEMTEXT and
CF_TEXT on the clipboard (depending what the source was), but when I paste
this contents in my application, I handle it through
GetClipboardData(CF_UNICODETEXT). Does Windows a conversion for me, here, or
are CF_OEMTEXT and CF_UNICODETEXT just two of the same?

2. When copying *to* the clipboard, does it suffice to copy CF_UNICODETEXT,
or am I supposed to copy both an Unicode and a CF_TEXT version of my data?
(And perhaps even a CF_OEMTEXT version too?)

Any other hints for me on this?

Thanks!


Sander Verhagen
[   Verhagen@nonono.Sander.com   ]



0
Verhagen (48)
7/13/2003 2:29:45 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
742 Views

Similar Articles

[PageSpeed] 36

"Sander Verhagen" <Verhagen@nonono.Sander.com> wrote in message
news:uPvNGtUSDHA.1576@TK2MSFTNGP12.phx.gbl...
> Hi,
>
>
> I understand this information is all out there, but it's all a bit
confusing
> and I never know for sure when I read about it...
>
> I had a non-Unicode application and copied/pasted to/from the
clipboard
> through CF_TEXT which went all fine. Now I moved to Unicode and need
to
> update my copy/paste routines. I implemented copy and paste for
> CF_UNICODETEXT.
>
> But I have some questions:
>
> 1. When I look in the DataObject Viewer I sometimes see only
CF_OEMTEXT and
> CF_TEXT on the clipboard (depending what the source was), but when I
paste
> this contents in my application, I handle it through
> GetClipboardData(CF_UNICODETEXT). Does Windows a conversion for me,
here, or
> are CF_OEMTEXT and CF_UNICODETEXT just two of the same?
>
> 2. When copying *to* the clipboard, does it suffice to copy
CF_UNICODETEXT,
> or am I supposed to copy both an Unicode and a CF_TEXT version of my
data?
> (And perhaps even a CF_OEMTEXT version too?)

See if the "Synthesized Clipboard Formats" sub-topic at this URL helps
at all...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/dataexchange/clipboard/clipboardformats.asp

-- 
Jeff Partch [VC++ MVP]


0
jeffp (1711)
7/13/2003 2:44:55 PM
Hi,


That's already rather helpful.

Hmm, so for compatibility with Windows 9x, I should explicitly implement
CF_OEMTEXT paste?

But why is it that when I copy something to the clipboard (as Unicode!),
including characters like � (and ��) I'm pasting values (bytes) like 0x99
that do not longer translate to �? So is the automatic (by Windows)
conversion from CF_UNICODETEXT to CF_OEMTEXT not working? Or do I have to do
some sort of special translation for this?

(Working on XP, for the moment.)


Sander Verhagen
[   Verhagen@nonono.Sander.com   ]

"Jeff Partch" <jeffp@mvps.org> wrote in message
news:eOTYS1USDHA.3144@tk2msftngp13.phx.gbl...
> "Sander Verhagen" <Verhagen@nonono.Sander.com> wrote in message
> news:uPvNGtUSDHA.1576@TK2MSFTNGP12.phx.gbl...
> > Hi,
> >
> >
> > I understand this information is all out there, but it's all a bit
> confusing
> > and I never know for sure when I read about it...
> >
> > I had a non-Unicode application and copied/pasted to/from the
> clipboard
> > through CF_TEXT which went all fine. Now I moved to Unicode and need
> to
> > update my copy/paste routines. I implemented copy and paste for
> > CF_UNICODETEXT.
> >
> > But I have some questions:
> >
> > 1. When I look in the DataObject Viewer I sometimes see only
> CF_OEMTEXT and
> > CF_TEXT on the clipboard (depending what the source was), but when I
> paste
> > this contents in my application, I handle it through
> > GetClipboardData(CF_UNICODETEXT). Does Windows a conversion for me,
> here, or
> > are CF_OEMTEXT and CF_UNICODETEXT just two of the same?
> >
> > 2. When copying *to* the clipboard, does it suffice to copy
> CF_UNICODETEXT,
> > or am I supposed to copy both an Unicode and a CF_TEXT version of my
> data?
> > (And perhaps even a CF_OEMTEXT version too?)
>
> See if the "Synthesized Clipboard Formats" sub-topic at this URL helps
> at all...
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui
/windowsuserinterface/dataexchange/clipboard/clipboardformats.asp
>
> --
> Jeff Partch [VC++ MVP]
>
>


0
Verhagen (48)
7/13/2003 3:57:25 PM
Hi,


Never mind that ;-)

I realize now that Unicode isn't really for 9x, so I can safely drop the
CF_OEMTEXT.

Thanks.


Sander Verhagen
[   Verhagen@nonono.Sander.com   ]

"Sander Verhagen" <Verhagen@nonono.Sander.com> wrote in message
news:uOvF8dVSDHA.2152@TK2MSFTNGP12.phx.gbl...
> Hi,
>
>
> That's already rather helpful.
>
> Hmm, so for compatibility with Windows 9x, I should explicitly implement
> CF_OEMTEXT paste?
>
> But why is it that when I copy something to the clipboard (as Unicode!),
> including characters like � (and ��) I'm pasting values (bytes) like 0x99
> that do not longer translate to �? So is the automatic (by Windows)
> conversion from CF_UNICODETEXT to CF_OEMTEXT not working? Or do I have to
do
> some sort of special translation for this?
>
> (Working on XP, for the moment.)
>
>
> Sander Verhagen
> [   Verhagen@nonono.Sander.com   ]
>
> "Jeff Partch" <jeffp@mvps.org> wrote in message
> news:eOTYS1USDHA.3144@tk2msftngp13.phx.gbl...
> > "Sander Verhagen" <Verhagen@nonono.Sander.com> wrote in message
> > news:uPvNGtUSDHA.1576@TK2MSFTNGP12.phx.gbl...
> > > Hi,
> > >
> > >
> > > I understand this information is all out there, but it's all a bit
> > confusing
> > > and I never know for sure when I read about it...
> > >
> > > I had a non-Unicode application and copied/pasted to/from the
> > clipboard
> > > through CF_TEXT which went all fine. Now I moved to Unicode and need
> > to
> > > update my copy/paste routines. I implemented copy and paste for
> > > CF_UNICODETEXT.
> > >
> > > But I have some questions:
> > >
> > > 1. When I look in the DataObject Viewer I sometimes see only
> > CF_OEMTEXT and
> > > CF_TEXT on the clipboard (depending what the source was), but when I
> > paste
> > > this contents in my application, I handle it through
> > > GetClipboardData(CF_UNICODETEXT). Does Windows a conversion for me,
> > here, or
> > > are CF_OEMTEXT and CF_UNICODETEXT just two of the same?
> > >
> > > 2. When copying *to* the clipboard, does it suffice to copy
> > CF_UNICODETEXT,
> > > or am I supposed to copy both an Unicode and a CF_TEXT version of my
> > data?
> > > (And perhaps even a CF_OEMTEXT version too?)
> >
> > See if the "Synthesized Clipboard Formats" sub-topic at this URL helps
> > at all...
> >
> >
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui
> /windowsuserinterface/dataexchange/clipboard/clipboardformats.asp
> >
> > --
> > Jeff Partch [VC++ MVP]
> >
> >
>
>


0
Verhagen (48)
7/13/2003 4:41:30 PM
Reply:

Similar Artilces:

xmldocument.preservewhite space question
I have an xmldocument and need to set the preservewhitespace to true as after processing the document I want to write out the xml (using outerxml/innerxml) and have the identations preserved for readability. However with the preservewhite space option set code such as: foreach (XmlNode node in ParentNode) { } fails as the whitespace seems to confuse the parser, how can I work around this? robert@orisoft.co.uk wrote: > I have an xmldocument and need to set the preservewhitespace to true as > after processing the document I want to write out the xml ...

Online Banking Question
I just installed Money 2004 and learned that although my bank has online banking it is not on their list of Financial Institutions. Does anyone know how who I might contact to get it added? Thanks! In microsoft.public.money, Sheesh wrote: >I just installed Money 2004 and learned that although my >bank has online banking it is not on their list of >Financial Institutions. Does anyone know how who I might >contact to get it added? Thanks! You could refer your bank to http://www.microsoft.com/money/partner/default.asp Who is the bank? Hi... it doesn't have to be on...

Notes question
Hello, Which form is GP Notes based on? If you attach a external file, where does it get stored? SQL Server or to a file system with a pointer in the database? Thanks, gsvi OLE notes are stored in a file in the OLE folder under your GP folder. The folder address is defined in the INI file on each workstation and, for them to work correctly, should all be pointing to the same shared folder. -- Richard L. Whaley Author / Consultant / MVP http://www.AccoladePublications.com Documentation for Software Users "gsvi" wrote: > Hello, > > Which form is GP Notes based on?...

Simple Question?
I have a form with a command button connected to a query that returns a recordset in datasheet view. One of the fields is EmployeeID which corresponds to tblEmployee.EmployeeID which likewise corresponds to tblEmployee.FirstName and tblEmployee.LastName. As it stands, when I run the query, I have field EmployeeID in the returned recordset. I would like to have the employee's concatenated full name instead. Is this possible? Thanks, Tim Just write "Select tblEmployee.FirstName & " " & tblEmployee.LastName from tblEmployee" tbrogdon@gmail.com wrote: >I ...

Cryptic question
I apologize for not being more descriptive in my first question money would not copy to CD. I was trying to put the file not money itself onto CD. What I would like to do is put the file to CD and then run money off to CD. I hope I'm wording this right as I am new to computers. It will not copy to a floppy disk neither. But it backs up just fine to CD ...

Searching Column Question
Hi All, I'm having a problem searching some of my excel sheets and hope someone might have a way to do this. I need to search a workbook with multiple sheets for a specific value only in one column. For an example I have a inventory workbook with lots of sheets. All sheets have a column for barcodes (column F) and I need to search this column for a specific barcode number on all sheets simultaneously. Can this be done? Thanks. Brad --- Message posted from http://www.ExcelForum.com/ Brad I don't believe you can limit your search to only one column on each sheet without VB...

REPOST: basic question re select
Sorry, did the accidental keystroke for send message....oops So how do I select records from a table where a field has a value or is null. I tried : select * from tbl_article where lift in(1 ,null) but that didn't work... AussieRules select * from tbl_article where lift =1 OR lift IS NULL "AussieRules" <nospam@nospam.com> wrote in message news:ezTLn6c8KHA.1424@TK2MSFTNGP04.phx.gbl... > Sorry, did the accidental keystroke for send message....oops > > So how do I select records from a table where a field has a value o...

report question
how can we make a report to see the cash sales detail and credit card sales detail? Hope someone can help me.. Try the Tender Summary Report in Reports --> Miscellaneous --> Tender Summary. There is some additional Tender Summary reports in the Reports Library, one includes Transaction Number. You need to have access to Customer Source in order to download the file. Tender Summary with Transaction Number http://tinyurl.com/9gt4d - Report http://tinyurl.com/djreu - Preview (pdf file) Rob "HOJIN" wrote: > how can we make a report to see the cash sales detail and cred...

RAID Question
Hi, Can you tell me, for a single Exchange 2003 server, which is better? Two drives configured to RAID 1 or RAID 10 for the entire server or RAID 1 on the system partition and RAID 5 for the rest? Thanks Jeff The answer: It Depends.... and Need More Information! It's fairly impossible to simply give a blanket statement that one is better than the other. There are too many other considerations you have to take into account. What you really need to do is get an accurate measurement of IOPS/user that you will need, and then base your storage needs off that (leaving room for grow...

text function question
Hi all, Hopefully my confuse is not so difficult to help. I have text arrays in column A2:A100 (much datas) which are filled with "n" and such as "loose end", "soft". I want in the column A1 is containing the text excludes "n". Due to of my poor function knowledge i tried to use CONCATENATE function but this is too long ..what should i use the proper formula. txs in advance 4 any helps One guess .. Assuming you want to extract text within A2:A100 that does not contain the letter "n", give this set up a try: Put in B2: =IF(A2=""...

Vlookup question #4
i have on sheet1 a list of reference data in two columns. column a) has a part code in it and column b) has a piece of data relating to it. in a few examples (infact probably the majority of cases) the code in cell a) is repeated a few times but with different data in cell b) on each occasion. is it possible to do a lookup where it finds and brings back data in column b)on all occasions when a code is found in column a, not just the first of last? does that make sense? cheers Rob Hi you may try downloadind Alan Beban's array functions (http://home.pacbell.net/beban) They'll includ...

How do I access clipboard?
I just got a message telling me I have a lot of data on my clipboard - what is the clipboard and how do I access it? The clipboard is the area of memory that Windows sticks something you have copied (usually to paste elsewhere). When you close Word or the document, it asks if you have finished with the stuff on the clipboard before it clears it out. Unless you intend to copy something to paste into another application and you are closing Word before pasting into the other application, it is safe to dump it. -- Terry Farrell - MSWord MVP "dukester" <dukester@d...

WorkFlow rule question
In my workflow rule I want to send an email to another employee in the company with a link of a form that needs to be updated. I have been looking at post callout but I am not sure what to do. Please help. Thank you Workflows don't allow you to randomly type in a email address. You have to create that user as contact in CRM with their email address and then it'll show up in your list of email addresses to choose from in the Workflow Manager setup for that particular workdlow. ...

A few very tough questions..
I recently took over an SBS 2008 installation from a group that had no business installing it in the first place. There were a ton of event viewer errors, Exchange, SBS Console, you name it, they screwed it up. There are 25 users and they never installed antivirus on either the Exchange mailboxes or the client computers. Enough of that.. Here are the few remaining issues. 1. They never ran a best practices tool. When I did Exchange showed a "first administrator group" of an old Exchange 2003 SBS install on another computer that crashed. I don't know how or why it&#...

XsltCompiledTransform question
Here are three things that I thought would be equivalent but are not. Just wondering why: XmlElement foo = doc.CreateElement("foo"); // load it up with a body xslt.Transform (foo, null, new XmlTextWriter(new StringWriter())); xslt.Transform (foo.CreateNavigator(), null, new XmlTextWriter(new StringWriter())); xslt.Transform(new XmlNodeReader(foo), new XmlTextWriter(new StringWriter())); Only the third one applies the transform and produces the expected output. The first two produce nothing. The docs say that passing in an XmlNode or navigator "usually an XmlDocument or ...

Clipboard
Hi, I am writing a program that uses a lot of color definitions, so I have built another "color-picker" program where you can click on a color and its RGB values will be known. This all works fine, although I want the text for the RGB macro to be copied to the clipboard when I click on a color, e.g. "RGB(192, 192, 192)" should be placed on the clipboard when I click on the gray area of the window so I can then paste it. I have got a CString to hold this value, however I can't get it into the clipboard. Whatever combination of the memory mapping functions I try ...

GetOpenFile question
Can someone explain to me why when the following code executes, the filename shown in the message box for the first iteration is the last file name selected in the multiple selection. The second iteration show the first file name selected and continues on in order until the next to last file name selected. Dim FileToOpen As Variant FileToOpen = Application.GetOpenFilename("TableFiles (*.prn), *.prn", , "Name of Files to Use", , True) counter = 1 Do While counter <= UBound(FileToOpen) MsgBox FileToOpen(counter) counter = counter + 1 Loop End Sub TIA Garry I d...

Simple Logic question?
Using Excel 2003, I'm trying to build a formula that displays a symbol in a cell to indicate the current date period. There are four rows of data, each representing a calendar quarter Q1, Q2, Q3, and Q4. Each row has a cell which indicates the last transaction date for that period. In the Q1 row, that date is 03/31/08. In the Q2 row, that date is 04/25/08 as that is the most current data set loaded. Q3 and Q4 date cells are blank. The first part of the formula needs to check if there is data by evaluating if the date cell is blank. If it is blank, then the result should be a blank ...

Windows PowerShell Time out question
Wondering if there's a way to limit how long PowerShell will try to get the following information out of a servers WMI. Here's what I've got currently, it works fine so long the servers respond... $a = New-Object -comobject Excel.Application $a.visible = $True $b = $a.Workbooks.Add() $c = $b.Worksheets.Item(1) $c.Cells.Item(1,1) = "Domain" $c.Cells.Item(1,2) = "Server Name" $c.Cells.Item(1,3) = "Operating System" $c.Cells.Item(1,4) = "IP Address" $c.Cells.Item(1,5) = "Service Packs" $c.Cells.Item(1,6) = "Sys...

Deleting Duplicate Row Macro Question
Hello, I have the below macro which deletes duplicate entries based on column "A" part number. The worksheet has nine columns, and column nine includes the UPC code. So some duplicate rows may contain column nine with a upc code and some may be blank. I need the duplicate rows that contains the ups code not to be deleted. Also, some duplicate rows may not contain any info in column nine, so still need it to leave one and delete others. Thanks JR Public Sub DeleteDuplicateRows() ' ' This macro deletes duplicate rows in the selection. Duplicates are ' counted in th...

Error Message: Cannot Empty the Clipboard
In Excel 2003, when I copy cells, I receive an error message that says "Cannot Empty the Clipboard" and am unable to paste the cells into any other application (e.g. Word). The clipboard appears to remain empty, though I am able to paste the contents of the copies to a different location in the same worksheet. Any thoughts on what the problem is or how to fix it? ...

SP2 update quick question
I have exchange 2003 sp1 installed on SBS 2003 std. Can i put the exchange SP2 update on the SBS without it having SP1? Also how much space does the exchange SP2 update take up? -- Regards, Matt On Wed, 21 Dec 2005 01:58:02 -0800, "Matt" <Matt@discussions.microsoft.com> wrote: >I have exchange 2003 sp1 installed on SBS 2003 std. Can i put the exchange >SP2 update on the SBS without it having SP1? > >Also how much space does the exchange SP2 update take up? You can install SP2 on a server that does not have SP1 already applied. Exchange Service Packs, like Wi...

question "File -> Send To -> Mail Receipient"
Dear, I am using all English Windows 98 SE, Office 97 Std SR2, IE 6.0 SP1, Netscape 7.2 Netscape Mail is my default MAPI If I open an XLS file in C:\WINDOWS\TEMP , "Sent to mail receipient" is not work. There was becasue the customer direct open an attachment (which must save in %temp%) then "Compose by anther email" without save the file. -david ...

Very Newbie Question
Hi Imust start by admitting I am not very experienced in the world of Outlook and Exchange but something I find very starnge happens on my network. Client Outlook 2002 Server Excgange 2003 with latest service pack I have set up an internal exchange system whereby the client has only an exchange account. Although the client does have internet access On this client I can email out to; for example hotmail and Gmail succesfully although there are NO external accounts configured I am impressed and yet concerened Is this supposed to happen and how does it work thanks for your time Dave C...

IE8 security add-on question
Is there functionality in IE8, or in an add-on which can block certain information being sent from IE8 to a remote web site. E.g. if my kids started using my PC, can I stop them sending our address, phone number, etc? I'm thinking of an add-on that would block certain text from being sent to an internet site. I know education is the best thing, but who's kids ever do everyhting they're told ;) Thanks for any help. Iain You'll find lots of good ideas & recommendations in this discussion: http://aumha.net/viewtopic.php?t=30095 That being said, Tough Love ...