Enable/disable EDIT Menu's PASTE item according to clipboarb's format

Env: Windows2000, VC++6.00, MFC, .

I have a CView based application, which deals with BITMAP. Since application
can receive pasting operation coming from clipboard only for BITMAP format,
so I hope that ID_EDIT_PASTE item on "Edit" Menu and ID_EDIT_PASTE  button
on toolbar can be enabled/disabled automatically according to the current
clipboard format.

I know I can do that if I put IsClipboardFormatAvailable(CF_BITMAP) into
ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, OnUpdateEditPaste) as follows,
void CMainFrame::OnUpdateEditPaste(CCmdUI* pCmdUI)
{
 pCmdUI->Enable( IsClipboardFormatAvailable(CF_BITMAP));
}

If I use this way, I found out that the button on toolbar will be updated
even if my application is inactive. I wonder if IsClipboardFormatAvailable()
will be called too frequently by this way?


I know if I use "Clipboard Viewer Windows" method, then my application can
receive WM_DRAWCLIPBOARD coming from the system. So I can call
IsClipboardFormatAvailable(CF_BITMAP) only when WindowProc() receive
WM_DRAWCLIPBOARD.

This way seems better than above. But because it is related to the system's
clipboard viewer chain, I am a little bit worried about safety problem led
by user's mis-operating.

Do you any good any suggestions?

Much appreciate your helps!
William

0
port (143)
10/18/2005 7:41:50 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
834 Views

Similar Articles

[PageSpeed] 56

It is not like an application can only get the Data in the BITMAP
format one can also Register there own Clipboard format.........
Using RegisterClipboardFormat() API

With the help of Windows API we can eaisly play with the System
Clipboard,

I was also dealing with the Clipboard, but I am using Third party Tool
Stingray Libarary, Which will take care of Copying to Clipboard and
Getting data from the clipboard......


Regards,


Paul

0
10/18/2005 11:39:05 AM
What is your suggestion?

> It is not like an application can only get the Data in the BITMAP
> format one can also Register there own Clipboard format.........
> Using RegisterClipboardFormat() API
> 
> With the help of Windows API we can eaisly play with the System
> Clipboard,
> 
> I was also dealing with the Clipboard, but I am using Third party Tool
> Stingray Libarary, Which will take care of Copying to Clipboard and
> Getting data from the clipboard......

0
port (143)
10/19/2005 2:05:41 AM
Reply:

Similar Artilces:

URGENT : Exchange server delete ZIP files, but filtering disable!!!!
Hi, I'm disappointed... I've a SBS 2003 server with Exchange Server 2003. I've just received an email with a "deleted0.txt" file instead-of a ZIP file. But the email attachment security is disable, and, in the past, ZIP files can be accessible to my users. The SecAttsConfig.xml is set to : <SecAttsConfig> <Enabled>False</Enabled> <SaveToFile Enabled="False" Location="" /> - <UnsafeAttachments> ..... I've change nothing in my config, I've just applyed latest services packs and updates. Where are the other se...

Editing, encoding and saving messages in OUTLOOK 2007
I came across a very peculiar phenomenon in OUTLOOK 2007. I edit received messages by deleting the “history” (the previous correspondence included by the sender) and leave only the new text written by the sender. I then save the messages “AS PLAIN TEXT”. The motivation is to keep the PST file small. When I reopen one of those edited received messages, I notice that the ENCODING is “Western European (Windows)”. When I change the ENCODING to “US ASCII”, ALL THE DELETED TEXT REAPPEARS! The described strange phenomenon implies that OUTLOOK didn’t actually delete the text rem...

DisAbled Accounts
We talked about this long time ago and it has come back. I have AD accounts which are disabled but I can still logon to those mailboxes from OWA adn when I send mail to those accounts they receive it. Though there is no SELF account and no other user has the Associated External Account permissiosn? How come I not get an NDR and why the user can logon via the OWA? Thank you. Have you checked your DC replication? Exchange reads the user information from the DCs, so if you have replication problems Exchange could be looking at out of date information. "WILDPACKET" <...

SMTP connector with outbound security enabled, enables authentication for all other connectors!!?!
Hi, *I have so far tested this on two Exchange Orgs. One being our live platform and the other our test enviroment. Both are running Active Directory native mode for 2003, with Exchange 2003 and Exchange SP1*. Right this is my scenario: I have two SMTP connectors, one is the default 'Internet' with a cost of 1 and address space of *. The other is called 'Admin users' has the a cost of 20 with the address space of * also. Our Front end exchange servers; let's call them: 'EXFE1 and EXFE2' are the local bridgeheads for both connectors. The Internet connector by de...

Enable automatic query refresh for all workbooks?
I know there's a way (according to a KB article on Office 2000 SR1), and in Office XP I must have turned this off somehow, since my workbook didn't ask me everytime if it should refresh or not, but I can't seem to find where this checkbox is in Office 2003! This checkbox has been removed in XL2003 for security reasons. You cannot off the prompt using the XL interface. Modifying the following registry key will give you the same effect: Path: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Options Key: QuerySecurity Values: 0 = Prompt on all workbooks 1 = Do Not Prom...

Edit Hyperlink disabled using Custom Shortcut Menu
I’ve inserted a hyperlink into one of my forms via a label object. I’ve assigned a custom Shortcut Menu Bar called “Edit Hyperlink” to the hyperlink label. My Custom “Edit Hyperlink” Shortcut Menu includes standard access commands such as Edit Hyperlink, Open Hyperlink, Open in New Window, Copy Hyperlink, and Remove Hyperlink. When I switch to form view and right click over the Hyperlink the “Edit Hyperlink” Shortcut Menu is displayed with the commands disabled (i.e. grayed out). Therefore I can’t use any of the commands on my “Edit Hyperlink” Shortcut Menu. Any idea as to what’s c...

Column format when merging Excel data to Word labels
I have a four column Excel spreadsheet which I have Mail Merged into Word to create labels. One of the columns in Excel contains a list of four digit numbers. Some of those numbers begin with a zero. When I have merged the data into Word labels, the four digit numbers starting with a zero have the zero missing. I have tried all sorts of number formats in Excel but can't get the zeros to stay there when merged to Word. Can anyone help???? I'm using Office 2003. There's an article on the Microsoft web site that might help you: Answer Box: Numbers don't merge right in Wo...

disable My Music redirect in SBS 2008
Someone made a comment least year in these groups that it wasn't difficult to disable things like My Pictures and My Music redirection in SBS 2008, but i can't find any documentation on how that is done...Is it really that easy and i'm not seeing it, or is it more difficult than he made it seem... jared The SBS wizard creates a group policy behind the scenes. You can edit that group policy if you so choose. -Cliff -- Cliff Galiher Microsoft has opened the Small Business Server forum on Technet! Check it out! http://social.technet.microsoft.com/Forums/en-...

Enable macros
I've got a fairly compex workbook with lots of named ranges. I've been using and updating this WB for over a year. All of a sudden, I now get the following message every time I enter something in any field: "The macros in this project are disabled. Please refer to the online help or documentation of the host application to determine how to enable macros." I don't have any macros in this workbook. Les ...

Can't open this item
Hi Outloook 2000 and Exchange 2000 I am having a problem with Outlook 2K sending tif and zip files. Any other file attachement works fine (.exe .pdf .doc etc) but as soon as tif and zip files exceed about 350k I get the message "Can't open this item" if I try to open it from the Sent items folder. I can send these files but if they get returned I get the error message. Any suggestions would be most welcome as I have no idea where to start with this. I have checked all the file size limitations in Exchange and Outlook that I know of. Thanks ...

IE6
I inadvertently checked the "Do not show me this message again" box, but, as I like to know when I am being re-directed to or from a secure site, I would like to re-enable it. Is is possible, please? Kate Kate wrote: > I inadvertently checked the "Do not show me this message again" box, > but, as I like to know when I am being re-directed to or from a secure > site, I would like to re-enable it. Is is possible, please? Have you looked at the settings for the security zone (probably the Internet security zone) under which the unidentified web...

Exporting From Quickbooks-not formatting numbers
I am trying to export a file from Quickbooks into Excel. The entire worksheet is formatted into text. When I format cells (as number) to use the SUM function, the formula doesn't calculate. Any ideas? Carrie, I've had some success previously by copying the "text" into Notepad, then copying the notepad window and dropping it back into excel (in a new workbook). Note that certain programs have "export" functions which assume an older version of excel, and so excel 2003 may not recognize the data in the way it was intended to be recognized. Alternately, th...

Enabling Circular Logging
Hi all. I am performing backups of my exchange DB's over the internet starting today. The company I am doing this with suggested enabling circular logging on the Exchange server to avoid backing up unnesseccary data and to svae over the wire bamdwidth. Can anyone explain to me what it is, and how to enble it? I have Exchange 2003 standard server with SP1. Thanks!!!! On Fri, 23 Dec 2005 08:51:01 -0800, "redrobit" <redrobit@discussions.microsoft.com> wrote: >Hi all. I am performing backups of my exchange DB's over the internet >starting today. The compa...

Problem with copy and paste
Hello, Seems to me I used to be able to copy and paste formulas from one sheet/workbook to another. Now, whenever I copy and paste from one sheet or workbook to another, the worksheet cell references and formulas are lost. What happened, and what can I do to fix it? thanks keith I can duplicate this if I have two instances of excel running--instead of one instance and two workbooks open in that instance. keith wrote: > > Hello, > Seems to me I used to be able to copy and paste formulas > from one sheet/workbook to another. Now, whenever I copy > and paste from one sh...

Outlook 2000 won't associate with Word 2000 for composing/editing
I loaded Microsoft Office 2000 Standard Suite. Outlook will not associate with Word for mail formating in HTML. When I try to write new mail I get a message "This form requires Word as your e-mail editor, but Word is either busy or cannot be found.The form will be opened in the Outlook editor instead." I am able to send documents direct from Word, using Outlook, with no problem. I've tried rebooting and I've tried reinstalling the suite to correct the problem, but it persists.What am I doing wrong and how can I get Outlook to accept Word for editing? What patch leve...

Columns and Column Format in Outlook Email
Hello all. I am using Office 2003 Professional. I stopped using Outlook as my default email client about two years ago, but I recently set it as the default again and I'm trying to set it up in a way that I feel is more "usable" for me. One thing I did was to select the columns that show in the message pane. I am using the view with the folders on the left, message pane in the upper right, and preview pane bottom right. I entered the Customize... dialog by right-clicking at the top of a column and selected Fields... This was done while the Inbox was open. I selected the fiel...

Determining if hibernation is enabled
Hi, I'm using SetSuspendState(TRUE, FALSE, FALSE) to put the pc in into hibernation, which only works if hibernation is enabled. How can I determine whether hibernation is enabled before calling, so I can report as much to my users? I'm working with VS2008, targetting XP and Vista. Thanks, Steph IsPwrHibernateAllowed\ GetPwrCapabilities or CallNtPowerInformation(Maybe it's better way) "Steph" <steph@newsgroups.nospam> д����Ϣ news:92169931-7711-41D8-A88E-6C6092343D40@microsoft.com... > Hi, > > I'm using SetSuspendState(TRUE, FALSE, FALSE) to put...

How to copy column of email addresses and paste directly to addr
I want to copy a column from an excel sheet and paste it directly to the address on an email.... How do I make the tthe semicolons appear? What happened when you tried it? What e-mail program are you using? A program like Outlook is smart enough to put the separator in by itself. You just copy the column and paste it in the "To:" box. Another option is to add the semi-colon in Excel. In another column, use: =a1&";" Copy this down Now copy and paste this column into the e-mail. Regards, Fred "Mrs. Mc" <Mrs. Mc@discussions.microsoft.com...

Easiest way to edit home video onto DVD
I currently record home video using my Sony Mini DV Digital Handycam, Model # DCR-TRV22. I'm beginning to pile up the mini tapes, which I can view by connecting the Handycam to my television. It would be nice to transfer the ones I want onto DVD. For instance, I have a new baby and would like to select favorite footage of her nicely edited onto a DVD she would cherish. Can anybody recommend the easiest way for me to accomplish this? Certainly not with anything in Mac Office. Having no idea what equipment you have available its hard to say, but if you're running OS X you already h...

disabling automatic hyperlinks
Hello- Is there a way to turn off automatic hyperlinking in Outlook, when using HTML or RTF formatting? I've checked through help and looked at autocorrect settings but have not found anything. Thanks for the assistance. Ray Stone wrote: > Hello- > > Is there a way to turn off automatic hyperlinking in Outlook, when using > HTML or RTF formatting? I've checked through help and looked at > autocorrect settings but have not found anything. > > Thanks for the assistance. Oops, I forgot to mention that this is Outlook 2003. ...

Date format #6
I receive data in different "formats". Excel recognizes the date as dd/mm/yyyy, but sometimes I get data with the date specified as mm/dd/yyyy. For example, my date column can have a dates such as 09/23/2003. How can I convert the date data I receive to be read by Excel as mm/dd/yyyy? Thanks Shaheed How you do get this data? Does it come as an ASCII file (.txt or .csv)? If yes, (Rename your .csv to .txt before starting) then do File|open and you'll get a text to columns wizard. Then specify each date field the way you want mdy, dmy, etc. Shaheed wrote: > > I recei...

Disable Automatic Hyperlinks
I have a spreadsheet with names, addresses, phone numbers, and e-Mail addresses. Is there ANY way to stop Excel 2003 SP2 from automatically turning the e-Mail addresses into Hyperlinks every dern time I copy the address or in any other manner make that cell active? TIA, Steve Try putting a single quote in front of the address. Not the best solution but it is what M$ recommends. -- Hope this helps Martin Fishlock, Bangkok, Thailand Please do not forget to rate this reply. "Og" wrote: > I have a spreadsheet with names, addresses, phone numbers, and e-Mail > address...

set enable & disable of button (VC 6.0)
Hello, For VC 6.0 (MFC) : How can I set the enable/disable state of that button ? Thanks :) this is not going to work buddy ....... read a book ..... "Eitan M" <no_spam_please@nospam_please.com> wrote in message news:ewfJoieGHHA.1232@TK2MSFTNGP05.phx.gbl... > Hello, > For VC 6.0 (MFC) : > How can I set the enable/disable state of that button ? > > Thanks :) > hi Eitan, Try following, //To Enable button...at run time ...IDB_MYBUTTON is ID of your botton GetDlgItem(IDB_MYBUTTON)->EnableWindow(TRUE); //To Disab...

Enable/disable EDIT Menu's PASTE item according to clipboarb's format
Env: Windows2000, VC++6.00, MFC, . I have a CView based application, which deals with BITMAP. Since application can receive pasting operation coming from clipboard only for BITMAP format, so I hope that ID_EDIT_PASTE item on "Edit" Menu and ID_EDIT_PASTE button on toolbar can be enabled/disabled automatically according to the current clipboard format. I know I can do that if I put IsClipboardFormatAvailable(CF_BITMAP) into ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, OnUpdateEditPaste) as follows, void CMainFrame::OnUpdateEditPaste(CCmdUI* pCmdUI) { pCmdUI->Enable( IsClipboardFormatAva...

Can you Mail-Enable/Disable Users by OU?
I was wondering if there was a way to mail-enable/disable users by OU or group in Exchange 2000? I have one 2000 domain with 800 or so users, but I only want 100 of them to have mailboxes. I know when you install Exchange it asks you which users you want to mail-enable. But I was wondering if there was a way to maintain this after the fact, say by saying everyone in a particular OU has a mailbox. Also, are there any security measure that I should take with regards to securing the Exchange server to the ~700 users who don't have mailboxes and should have any access to the Exchange serve...