Shift+Insert does not paste into edit control on CFormView derived view

Hi,

I have an edit control on a form view.  The problem is that pasting of 
clipboard content does not seem to work with Shift+Insert key combo.  There 
is no problem with pasting when using context menu.  If I test the 
underlying dialog from IDE resource editor then Shift+Insert works fine. The 
Shift+Insert combo also works fine with other dialogs in the app.

This problem can be easily illustrated by creating a simple SDI app with a 
form view and then dropping an edit control onto the form.

Is this an expected behaviour?

Thanks,
Bogdan


0
bogdan1 (22)
12/20/2007 2:36:26 PM
vc.mfc 33608 articles. 0 followers. Follow

9 Replies
977 Views

Similar Articles

[PageSpeed] 18

"Bogdan" <bogdan@domain.com> wrote in message 
news:eoDi1WxQIHA.5524@TK2MSFTNGP05.phx.gbl...
> Hi,
>
> I have an edit control on a form view.  The problem is that pasting of 
> clipboard content does not seem to work with Shift+Insert key combo. 
> There is no problem with pasting when using context menu.  If I test the 
> underlying dialog from IDE resource editor then Shift+Insert works fine. 
> The Shift+Insert combo also works fine with other dialogs in the app.
>
> This problem can be easily illustrated by creating a simple SDI app with a 
> form view and then dropping an edit control onto the form.
>
> Is this an expected behaviour?
>
> Thanks,
> Bogdan
>

Bogdan, I created a SDI app with a FormView and an EditBox in the formview 
and got the same behavior - Shift+Insert did not paste into the edit box, 
which had the focus.  I fixed it by editing the accelerators using the 
Resource Editor and removing the Shift+Insert accelerator.  I think what is 
happening is the accelerator gets the Shift+Insert first, which generates 
the ID_EDIT_PASTE command, and the edit box has no idea what is your app's 
ID_EDIT_PASTE command so it ignores it.  Removing the accelerator causes the 
Shift+Insert to be routed to the edit box normally, and it processes it 
then.

-- David


0
dc2983 (3206)
12/20/2007 3:34:32 PM
"Bogdan" <bogdan@domain.com> wrote in message 
news:eoDi1WxQIHA.5524@TK2MSFTNGP05.phx.gbl...

> I have an edit control on a form view.  The problem is that pasting of 
> clipboard content does not seem to work with Shift+Insert key combo...

Just a comment:  I thought Shift+Insert went out as the recommended paste 
operation with Windows 3.1 (though it continues to work in many 
applications).

Isn't Ctrl+V the standard for paste?

Dave
-- 
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mozartists/mailinglist.htm 

0
dave9996 (486)
12/20/2007 3:46:25 PM
Shift-Insert became obsolete well over 15 years ago, and Ctrl+V is what is used and
expected today.  I didn't know that any controls even supported these obsolete command
sequences today.

By "no problem", presumably you mean you right-clicked on the edit control and selected
Paste.  If it works in test mode in the IDE, then you have a problem with the key sequence
being handled by your app somehow, and I'd suggest using Spy++ to see if it is received by
the edit control at all.  Note that "running the dialog under the IDE resource editor" is
a completely different context than running it in your app, since VS is doing a lot of
work for you.  But in a CFormView, the shortcuts are dispatched via the ACCELERATOR
resource, and it might be intercepted by your top-level message handler, in which case you
would need to forward it.  Look at your ACCLERATOR resource in your app, and be aware that
it might be quite different from the ACCELERATOR resource used by VS in test mode.
					joe

On Thu, 20 Dec 2007 09:36:26 -0500, "Bogdan" <bogdan@domain.com> wrote:

>Hi,
>
>I have an edit control on a form view.  The problem is that pasting of 
>clipboard content does not seem to work with Shift+Insert key combo.  There 
>is no problem with pasting when using context menu.  If I test the 
>underlying dialog from IDE resource editor then Shift+Insert works fine. The 
>Shift+Insert combo also works fine with other dialogs in the app.
>
>This problem can be easily illustrated by creating a simple SDI app with a 
>form view and then dropping an edit control onto the form.
>
>Is this an expected behaviour?
>
>Thanks,
>Bogdan
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
12/20/2007 3:57:52 PM
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:ju3lm3pqonkbf4a1ukvj720dkh1iiru27b@4ax.com...
> Shift-Insert became obsolete well over 15 years ago, and Ctrl+V is what is 
> used and
> expected today.  I didn't know that any controls even supported these 
> obsolete command
> sequences today.
>

The AppWizard creates accelerators for Shift+Insert and the other old CUA 
shortcuts, as well as Ctrl+V and the new CUA shortcuts (which MS wasted no 
time in adopting once the court said it had not infringed on Apple).  I like 
both the old and the new.  The old makes more logical sense, and the new 
makes it easy to press with just your left hand.  BTW, you assert that the 
mouse and keyboard are not meant to be used together, but actually it is 
quite typical to use the left hand for typing and the right hand for mouse, 
as this shortcut makes apparent.

-- David


0
dc2983 (3206)
12/20/2007 5:28:53 PM
Thanks to everyone who responded to my original post.

I'm still struggling with the problem.  I just realised that the problem is 
not limited to the 'old style' shift+insert.   Neither of the key combo that 
could be found under the default Edit submenu will work with edit controls 
on a form.  That is: ctrl+x, ctrl+v, ctrl+c, and ctrl+ins.

As pointed out in the replies above, this behaviour is true for every key 
combo found in the app's accelerator table.  Unfortunately I can't remove 
the key mappings from the table because I need them in other non-form views 
(my app consists of multiple views with only one active at a time).

So, it looks like I'd need a way to disable and enable accelerators at 
run-time.  Is this possible?

Another approach would be to implement command handlers for undo, cut, copy, 
and paste and then forward the command to an edit box that has focus.  CEdit 
seems to have suitable methods for that (e.g. Copy(), Paste(), Cut(), etc.).

I'd appreciate any comments.

Thanks,
Bogdan


"Bogdan" <bogdan@domain.com> wrote in message 
news:eoDi1WxQIHA.5524@TK2MSFTNGP05.phx.gbl...
> Hi,
>
> I have an edit control on a form view.  The problem is that pasting of 
> clipboard content does not seem to work with Shift+Insert key combo. 
> There is no problem with pasting when using context menu.  If I test the 
> underlying dialog from IDE resource editor then Shift+Insert works fine. 
> The Shift+Insert combo also works fine with other dialogs in the app.
>
> This problem can be easily illustrated by creating a simple SDI app with a 
> form view and then dropping an edit control onto the form.
>
> Is this an expected behaviour?
>
> Thanks,
> Bogdan
>
> 


0
bogdan1 (22)
12/20/2007 9:20:11 PM
"Bogdan" <bogdan@domain.com> wrote in message 
news:O9n$d40QIHA.1188@TK2MSFTNGP04.phx.gbl...
> Thanks to everyone who responded to my original post.
>
> I'm still struggling with the problem.  I just realised that the problem 
> is not limited to the 'old style' shift+insert.   Neither of the key combo 
> that could be found under the default Edit submenu will work with edit 
> controls on a form.  That is: ctrl+x, ctrl+v, ctrl+c, and ctrl+ins.
>
> As pointed out in the replies above, this behaviour is true for every key 
> combo found in the app's accelerator table.  Unfortunately I can't remove 
> the key mappings from the table because I need them in other non-form 
> views (my app consists of multiple views with only one active at a time).
>
> So, it looks like I'd need a way to disable and enable accelerators at 
> run-time.  Is this possible?
>
> Another approach would be to implement command handlers for undo, cut, 
> copy, and paste and then forward the command to an edit box that has 
> focus.  CEdit seems to have suitable methods for that (e.g. Copy(), 
> Paste(), Cut(), etc.).
>
> I'd appreciate any comments.
>

Bogdan, can you load a different accelerator table without these 
accelerators when your view is activated and set the default accelerator 
table when it is deactivated?

-- David 


0
dc2983 (3206)
12/20/2007 9:51:36 PM
Absolutely.  I like the idea because it nicely fits into what I've got so 
far.  I already load a different menu for each view.  I use doc's 
GetDefaultMenu() and I think I should be able to use GetDefaultAccelerator() 
also to avoid CFrame's LoadAccelTable() that raises asserts in the debug 
mode.

Thanks again,
Bogdan


"David Ching" <dc@remove-this.dcsoft.com> wrote in message 
news:ItBaj.32172$JD.26276@newssvr21.news.prodigy.net...
> "Bogdan" <bogdan@domain.com> wrote in message 
> news:O9n$d40QIHA.1188@TK2MSFTNGP04.phx.gbl...
>> Thanks to everyone who responded to my original post.
>>
>> I'm still struggling with the problem.  I just realised that the problem 
>> is not limited to the 'old style' shift+insert.   Neither of the key 
>> combo that could be found under the default Edit submenu will work with 
>> edit controls on a form.  That is: ctrl+x, ctrl+v, ctrl+c, and ctrl+ins.
>>
>> As pointed out in the replies above, this behaviour is true for every key 
>> combo found in the app's accelerator table.  Unfortunately I can't remove 
>> the key mappings from the table because I need them in other non-form 
>> views (my app consists of multiple views with only one active at a time).
>>
>> So, it looks like I'd need a way to disable and enable accelerators at 
>> run-time.  Is this possible?
>>
>> Another approach would be to implement command handlers for undo, cut, 
>> copy, and paste and then forward the command to an edit box that has 
>> focus.  CEdit seems to have suitable methods for that (e.g. Copy(), 
>> Paste(), Cut(), etc.).
>>
>> I'd appreciate any comments.
>>
>
> Bogdan, can you load a different accelerator table without these 
> accelerators when your view is activated and set the default accelerator 
> table when it is deactivated?
>
> -- David
> 


0
bogdan1 (22)
12/20/2007 11:06:19 PM
Yes, a really well-done app uses mouse and left-hand modifiers including key sequences
like Ctrl+V, but requires no two-handed typing.  The use of left-hand commands simulates
the original chord keyboard interface.
				joe

On Thu, 20 Dec 2007 17:28:53 GMT, "David Ching" <dc@remove-this.dcsoft.com> wrote:

>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
>news:ju3lm3pqonkbf4a1ukvj720dkh1iiru27b@4ax.com...
>> Shift-Insert became obsolete well over 15 years ago, and Ctrl+V is what is 
>> used and
>> expected today.  I didn't know that any controls even supported these 
>> obsolete command
>> sequences today.
>>
>
>The AppWizard creates accelerators for Shift+Insert and the other old CUA 
>shortcuts, as well as Ctrl+V and the new CUA shortcuts (which MS wasted no 
>time in adopting once the court said it had not infringed on Apple).  I like 
>both the old and the new.  The old makes more logical sense, and the new 
>makes it easy to press with just your left hand.  BTW, you assert that the 
>mouse and keyboard are not meant to be used together, but actually it is 
>quite typical to use the left hand for typing and the right hand for mouse, 
>as this shortcut makes apparent.
>
>-- David
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
12/21/2007 1:23:03 AM
Could it help you: http://support.microsoft.com/kb/q145616/

Victor

"Bogdan" <bogdan@domain.com> wrote in message 
news:eoDi1WxQIHA.5524@TK2MSFTNGP05.phx.gbl...
> Hi,
>
> I have an edit control on a form view.  The problem is that pasting of 
> clipboard content does not seem to work with Shift+Insert key combo. 
> There is no problem with pasting when using context menu.  If I test the 
> underlying dialog from IDE resource editor then Shift+Insert works fine. 
> The Shift+Insert combo also works fine with other dialogs in the app.
>
> This problem can be easily illustrated by creating a simple SDI app with a 
> form view and then dropping an edit control onto the form.
>
> Is this an expected behaviour?
>
> Thanks,
> Bogdan
>
> 


0
1/2/2008 8:46:58 PM
Reply:

Similar Artilces:

setting timeout in XML controls
Is there a way to set a timeout in either MSXML or in .NET's XML classes? --Buddy Hi, If you're using MSXML4.0 take a look at the ServerXMLHTTP: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm/xml_mth_sz_0cj7.asp Regards, Ion Vasilian -- This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm. "Buddy Ackerman" <buddy@buddyackerman.com> wrote in message news:uHqaoAkmDHA.2068@TK2MSFTNGP09.phx.gbl...

Form Header Control problem
I have a form based on a query that displays fields in the form header and data is entered in the detail section. When I use the record selector to go through the records the data in the detail area is updated but not the header section. I added the header section so that I could insert a tab control at the top of the detail section. Thanks in advance for any input. ...

automatic addresses in to:,cc: and bcc: fields, how to edit, delete, etc.
I don't know what it is called, but when you go to enter the names in the To, CC, and BCC in Outlook they automatically pop up. Very nice option. For example, when I go to write Tara Lewis. I write Tara and it finds the rest and pops/fills in the field. Well, this name is in a list somewhere. Where is this list, what is it called? And this list is not the same as "contacts." I'm trying to find out how to delete, edit, change, add in this list. For example. My friend Brian has two entries. One correct and one incorrect, spelled Brain. So when I write B - R it puts u...

How to insert a page break every 10 lines
Hi, I have been stumped on this one. I have been trying to write a macr for days on inserting a page break every 10 lines and haven't been abl to figure it out. I will have have to write a macro to insert a blan row every two lines. Thanks, Ev ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com Eva, The following code will insert a page break every 10 rows. Change the values of StartRow and EndRow to meet your needs. Dim RowNdx As Long Dim StartRow As Long ...

Inserting picture as a background
I inserted a picture as my background from my hard drive. Multiple images appeared in the document. I know that if you are working with a webpage it tiles so that the image appears on each page. But I am creating a brochure and only want 1 image. Has anyone else experienced this and do you have a solutionl. -- kbp When you use the Format >> background you will get tiling. Best to put an image on the Master Page and stretch it to fit. -- Mary Sauer http://msauer.mvps.org/ "Kimberley" <Kimberley@discussions.microsoft.com> wrote in message news:F2123E93-DDEF-4...

Insert rows and fill formulas
I have just added this on a work sheet. It works OK when sheet is unprotected but when I protect the sheet it comes up error 400. If I select Insert row on protection box it will insert row but not formulas while protected. How can I get it to work while sheet is protected. I have also setup a botton on the taskbar to do this for me but it will only do it for the day I set it up in. When I save as for the next day it wont work on the new sheet. Your help will be appreciated Regards Chris I'm not an expert but I thought the whole idea of protecting the worksheet is so p...

How to create treeview active control as another activex control's child?
I want to create an activex control who will wrap a treeview active control but has some its own logic. I don't know how to create it and how to set its position and size. say,if I want my active control's size is the same as the treeview active control. Any idea ? Thanks ...

Business Portal
How do you modify the data grid (add and move a column) on the Purchasing module -> Requisitions. After selecting a vendor, a grid is shown listing all items on requisitions for that vendor. I would like to move the Req. # column to the first position, and also add the "Title" field from the requisition to this grid. -- JoeS You cannot modify the windows in Requisition Management. -- Charles Allen, MVP "Joe Smith" wrote: > How do you modify the data grid (add and move a column) on the Purchasing > module -> Requisitions. After selecting a vendor,...

Can't insert column; keep receiving error message
I was updating a large spreadsheet and all of a sudden I was unable to insert columns. I kept getting an error message that said, "...unable to shift nonblank cells off worksheet." I tried everything from unhiding all columns and rows toreformatting all the comments to move and size with their relative cells. I also removed all the comments and I was still unable to insert a column. Does anyone have a solution Thank you >-----Original Message----- >I was updating a large spreadsheet and all of a sudden I was unable to insert columns. I kept getting an error message th...

help needed with repeated copy/paste special
[image: http://home.cogeco.ca/~rbhayana/backload.gif] [image: http://home.cogeco.ca/~rbhayana/mastertable.gif] I ran into a lot of work and am wondering if anyone can help me out. Help would be greatly appreciated because going thru 19272 records for copying and pasting is driving me insane. :mad: These are the 2 files I'm dealing with (see pictures above). Top one is backload file and the one underneath is mastertable. As you can see, FundataKey is common to both files. The values of Fundatakey are not repeated in mastertable however are repeated in the backload file. What...

Insert file name in Excel
I want to insert the file name into a cel of my Excel Worksheet. I need this for document management issues with Microsoft Business Soltutions Axapta. I work with Microsoft Office Excel 2003. =MID(CELL("filename",A1),FIND("[",CELL("filename",A1)) +1,FIND("]",CELL("filename",A1))-FIND("[",CELL ("filename",A1))-1) HTH Jason Atlanta, GA >-----Original Message----- >I want to insert the file name into a cel of my Excel Worksheet. >I need this for document management issues with Microsoft Business >Soltutions ...

File in Use
Here's a bit of an odd one. We have a report from one group of users about an issue they are having with opening files in a particular directory on one of our file servers (Windows Server 2003 SP1 in 2003 Domain). When the user (client is Windows xP SP2, Office 2003) attempts to open an excel file in this directory that is opened by another user, they get the usual "File in Use" prompt (with - Read Only, Notify and Cancel as options). Usually in such a situation it will say "Filename.xls is locked for editing by 'username'." but for some reaon the usernam...

I did install Genuine Advantage ActiveX control. But why could not find it in my IE Add-ons List?
Several days ago, I downloaded Windows Mobile Device Center from Micorosft web site for my Windows 7. As it needed Windows Genuine Verification, I installed the Genuine Advantage ActiveX control for my IE8. But now, I can not find this activeX control in my IE Add-ons List( IE -> Tools -> Manage Add-ons options of Internet Explorer ). Anyone could tell me why and where? Thanks in advance. It installed and it is not removable in any shape or form. Once done (Genuine Advantage ActiveX) it is done :-) -- Peter Please Reply to Newsgroup for the benefit of oth...

viewing photos sent as attachments
I have been sent some photo's as an attachment and am trying to view them using Word 97, each one appears as a frame and image number how do I convert them to a proper photo? Are they doc-files then? You're probably better of viewing them in a photo-editor application -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "greygroob" <greygroob@discussions.microsoft.com> wrote in message news:E497166C-998F-4DD2-80C6-A83CA474F9B2@microsoft.com.....

Get control of a Userform by the Name
I want to change the text of a form. I know the name of the form and the name of the control in it. How to get the control of a form if I know the Name? Below post refers to adding a form. But I already have a form, just need the control of that! http://groups.google.co.in/group/microsoft.public.excel.programming/browse_thread/thread/beedb666e1d7a29b/f2df993ded867dd4?hl=en&lnk=gst&q=form+by+name#f2df993ded867dd4 Thanks a lot in advance Regards' Joe If you are talking about a VBA user from in VBA window press F4 (View properties window) and click on the control....

View messages by Message Timeline
When working with message views I selected view current view by "Message Timeline" and find the format very useful for keeping chronologic track of events. The question is that from time to time a bar of varying length appears over some of the messages and I'm not sure what it means. At fires I thought it had something to do with the number of message threads but some of the messages with few threads had longer bars than the ones with a good number of threads. Does anyone know what these thing are? That bar generally shows how long you were working on the item in ques...

View query results in MsgBox
I have developed qryQuickLook that brings up rptQuickLook when cmdQuickLook is clicked, everything works great but I would rather see the results (never more than 10 line items) in a MsgBox than have a seperate report window open up. Is there a way to do this? Thanks Dave On Nov 23, 11:00 pm, Duane Hookom <duanehookom@NO_SPAMhotmail.com> wrote: > Why "MsgBox"? You can display the results in a dialog form with a command > button or two. > > -- > Duane Hookom > Microsoft Access MVP > > > > "maces...@gmail.com" wrote: > > I have deve...

CRM 4.0: Deleting system views
In CRM 4.0 I cannot find a way to hide or delete system views (Accounts: No Orders in Last 6 Months). In CRM 3.0, you could work around this by sharing with a "dummy" user, which would hide it from the rest of the users. I cannot find such a work-around in 4.0; has anyone else? Hi Mike, You can read my blog on how to hide it using a Plugin. http://msdynamicscrm-e.blogspot.com/2008/02/hiding-view-in-crm-40-using-plug= -in.html Hope this helps! Darren Liu, Microsoft CRM MVP Crowe http://www.crowecrm.com On Apr 18, 1:38=A0pm, MikePSU <mike.szyme...@gmail.com> wrote: > I...

How to control network shares programatically?
Hello, I am trying to discover a non-GUI method of recording a network share's permissions and security settings, taking the share off-line, doing a bit of maintenance on the data on the share, bringing the share on-line again, and restoring all of the security and permission settings. Only the top level (shared folder) permissions and security settings need to be preserved. The individual files don't have special settings. The general NET SHARE commands can remove and install a shared folder, but can't help record and manage the security and permissions settings. I'm tr...

Custom View #3
I have created a custom view that has the items grouped by conversation. My question is; is there a way to filter the view so that it will show only those conversations with a single mail item. To give you a better understanding of what I am after. We have a public folder where questions can be submitted. We are looking for a simply way to identify those questions that have never been responded to. Hence, viewing by conversation and showing only those with a single mail item will be enough to identify those which need to be addressed. ...

Control dispatch for module load ...98 OS
Hi, Is there any control dispathc for module load? Like "Create_Process" is there for process create and whenever any process gets created corresponding dispatch function gets called up.I want similar control dispatch for module load or module terminate.Ex: If any .EXE or .DLL gets loaded i want my control dispatch function to catch it. I am using Win98/ME OS.Writing small Driver call "Process notifier driver". regds vinay ...

Paste Disabled- how to enable it?
Dear all, I am using MS excel 2007. After opening an excel file, my excel can't "paste" or paste special when i right click the mouse. Both function are disable. I have tried all excel option and stil can't sovled the problem. Please give me some helps... Thank you!!! just checking but have you first clicked COPY -- grizz "JJ" wrote: > Dear all, > > I am using MS excel 2007. After opening an excel file, my excel can't > "paste" or paste special when i right click the mouse. Both function are ...

calendar views
Outlook is stuck on recurring events. I feel like someone has tinkered with my computer. I am unable to return to the day/wee/month view. Help, please. What version of Outlook? Is it your main calendar folder? If you don't use many custom views, you can restart Outlook using the cleanviews switch, but it will wipe out all custom views you have. See http://www.outlook-tips.net/beginner/resetview.htm if you need help using cleanviews. If you have a lot of custom views, you might be able to get out of it by switching to another calendar and back. -- Diane Poremsky [...

Repost-Edit and save query criteria
Sorry to repost this, but I was not sure I would get help with this again and it would get lost in the list. As suggested, I created a table called ExcludeShows1 with the ShowID and Year fields. I have posted the SQL with those changes to the query. When I tested this initially, it appeared to work. Then I tried testing the queries using last year's show data for 2009. No data is being returned for 2009. Not sure what is happening that it is not returning 2009 data. SELECT Shows.ShowID, Entries.Place, IIf([Entries]>1,([Entries]-[Place])*0.5,0) AS Points1, IIf([...

PostMessage to dialog vs. direct control
I have a process control layer in an app that controls, among other things, about 2 dozen dialogs (it's a dialog app). From a general design standpoint, is it better for the control layer, which stores a pointer to each dialog, to control the dialogs via PostMessage(), or to directly control the dialogs through its pointer to them. For example, a common function is to the refresh the dialog's data and make it visible. Is it better to do it using the dialog's pointer like this? mpDlgPattern->ShowDialog(&m_dataPattern); or like this: mpDlgPattern->PostMessage(DI...