Shortcut Key in Edit Box?

Can someone tell me how to create a shortcut key in an edit box similar to 
the Ctrl-C and Ctrl-V that come standard in an edit box.  Also, how do I trap 
that event so I can execute the routine I want to run.

Thanks,

Phil
0
Phil1 (164)
11/10/2004 5:31:04 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
470 Views

Similar Articles

[PageSpeed] 10

You will have to use accelerators for that.  What you have to do is create
an accelerator table in your resource.  Enter your custom command, and
assign keys to them. Then within your control you can load the table using
LoadAccelTable and through your PreTranslateMessage method you have to allow
the control to dispatch accelerator message by calling TranslateAccelerator.

Take a look at these sites
http://support.microsoft.com/default.aspx?scid=kb;en-us;222829
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardaccelerators/usingkeyboardaccelerators.asp

AliR.

"Phil" <Phil@discussions.microsoft.com> wrote in message
news:20A46EBD-50E5-4610-912D-00889FB41252@microsoft.com...
> Can someone tell me how to create a shortcut key in an edit box similar to
> the Ctrl-C and Ctrl-V that come standard in an edit box.  Also, how do I
trap
> that event so I can execute the routine I want to run.
>
> Thanks,
>
> Phil


0
AliR (179)
11/10/2004 5:42:07 PM
Reply:

Similar Artilces:

-->edit -->clear -->all; Can removed from standard menu?
I have tried a dozen protection setups in an attempt to keep someone from using clear all to delete data in unlocked cells. (They need to change values in these cells thus the access). Clear contents is OK. Is there a vba way to remove this particular entry in the standard excel menu? Thank you. excel 2003 > I have tried a dozen protection setups in an attempt to keep someone > from using clear all to delete data in unlocked cells. =A0(They need to > change values in these cells thus the access). =A0Clear contents is OK. > > Is there a vba way to remove thi...

Combo box to find records
Hi, need help with what I am sure is a simple problem. I have a form and wish to find records using a combo box. Which I know how to do. The problem is it takes me to "one" record. I would like to select, for example, employee name: John Smith and it return all records for John Smith while filtering out all other records. I would be thankful for any help. Thanks, Michael On Wed, 30 Jan 2008 20:24:04 -0800, Michaelchessking <Michaelchessking@discussions.microsoft.com> wrote: >Hi, need help with what I am sure is a simple problem. > >I have a form and wis...

CScrollBar box flicker problem
I put CScrollBar in CDialog and thumb button flickering all the time. Somone can help me? Tnx ...

Excel should allow auto shape boxes to be fixed to points on the g
I have constructed a graph that has data added to it daily. On the graph I have used several auto shape boxes to highlight key data milestones. Problem is every time I add new data the auto shape boxes move and have to be manually adjusted to repoint them to the relevant data point. Is there any way they can be fixed to the relevant data points on the graph so that they remain fixed to that point and therefore don't move/shift when new data is added? ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for ...

How do to enter data in a combo box on a worksheet?
Use the dropdown arrow? Shereen wrote: -- Dave Peterson ...

Disable 'Macro' dialog box...
Thanks Geoff, for the info on how to protect the VBA code. Have one further question; Now that the workbook and code is protected, I have sub routines that are run from command buttons. However, it is still possible to push ALT-F8 to list my routines, then click on a routine, then choose 'Run'... Is there a way to disable this option, so that users can not view or run the list of available routines (I need them to run the routines, only from the command buttons). Ruskin You can do what you want by making each macro a Private macro. This will preclude that macro from appearing...

Combo Box Moves
I have 4 activeX control combo boxes on an Excel sheet (2 on the left and 2 in the middle) and if I print the sheet the 2 boxes thatbare in the middle move over to the left hand side. I have gone into the properties menu and they show as locked but it does not make any difference. Also when I print the sheet the 2 boxes on the left which were made the same size as the underlying cells print out smaller than the underlying cells. Can anyone help please? Hi John, See MSKB Article # 838910 (Controls move to the left of the worksheet in Microsoft Excel 2002) http://support.micr...

After Add Record, Put Cursor in specific Text Box
Hi, I had the wizard set up a button to add record (it puts in the code below in the On Click property of the button). I'd then like to have the focus go to text box [ProjectType]. I don't know how to do that. TIA :) Private Sub cmdAddRecord_Click() On Error GoTo Err_cmdAddRecord_Click DoCmd.GoToRecord , , acNewRec Exit_cmdAddRecord_Click: Exit Sub Err_cmdAddRecord_Click: MsgBox Err.Description Resume Exit_cmdAddRecord_Click End Sub Private Sub cmdAddRecord_Click() On Error GoTo Err_cmdAddRecord_Click If Me.Dirty Then Me.Dirty = False If ...

edit recurring tasks
Is there any way to access and edit a single, specific recurring task? Hmmm, can you be more specific? The way I understand the question, then all you have to do is double click the instance (calendar appointment or To Do task )and in the window that pops up, click on Recuring task and edit the properties, after choosing whether you wish for the editing to happen to that occuance only or the whole series... -Normand >-----Original Message----- >Is there any way to access and edit a single, specific >recurring task? > >. > ...

Cut/Copy/Paste not working for a subclassed edit control
What do I need to do to regain this functionality? Thanks, Drew Well, why did it stop working? AliR. "Drew" <dam@dam.dam> wrote in message news:ul$zFMjyHHA.1208@TK2MSFTNGP05.phx.gbl... > What do I need to do to regain this functionality? > > Thanks, > Drew > Maybe if you can tell us how to recreate it. AliR. "AliR (VC++ MVP)" <AliR@online.nospam> wrote in message news:FEOni.22648$RX.6967@newssvr11.news.prodigy.net... > Well, why did it stop working? > > AliR. > > > "Drew" <dam@dam.dam> wrote in me...

How do I change Credit Limit for MS Money 2006 Standard Edition?
I found this annoying as well. And since I use Google Groups to answer a lot of my questions, I thought I would help by posting a solution that I had for others. I couldn't for the life of me change the Credit Limit or credit card interest rate for a newly added credit card from a bank that WAS in MS Money's list of banks in the "Select a Bank or Brokerage" screen. So, I deleted that new account I created and then: 1. Went to Account List 2. Added a New Account 3. Chose "Other" 4. Chose Credit Card 5. Proceeded through the wizard. Also, since I got my CC from a...

New to Office 2004 for the Mac (Student & Teacher Edition)
I am interested in knowing a good resource book or CD that can teach me this particular version of Office for my new Mac. Also, I am interested in learning about Microsoft Office Specialist Certification. Which version is recommended I pursue certification in that would position my Microsoft Office knowledge for the today's business environment and future? I am interested in any guidance with the above. Many thanks. On 2/5/07 8:24 PM, in article 1170725040.160941.305960@h3g2000cwc.googlegroups.com, "thomas_boston@hotmail.com" <thomas_boston@hotmail.com> wrote: > ...

Public Function to display in text box
Have public function (loaded in the global module) that produces a variable as a double. That all works fine as evidenced by the debug.print method in the immediate window. I desire to have the current value of the variable displayed in a text box. I created a callback function (loaded in global module) that looks like: Public Function GetCurrentWork_GPCI() As Double Dim CurrentWork_GPCI As Double GetCurrentWork_GPCI = CurrentWork_GPCI End Function I can't figure out how to make it display; I've currently got the control source property ...

edit variable length items in "Access" database tables
In my database table I am holding a variable length item in a database record; the item may be from two to six alphabetic characters long. Trailiing spaces pad the item where required. To print out the item in a report, the item itself is sandwiched between two fixed-length items separated by an oblique stroke, (forward slash): - ***/variable length/***. How can I suppress the trailing spaces in my variable length item when printing results ? Yours Sincerely, CHARLES WALKER Take a look at the RTrim function or even the Trim function. RTrim(SomeField) will trim trailing spaces off a...

Cannot create a key uder HKEY_USERS !
Hi, I want to make a new key under HKEY_USERS. I use RegCreateKeyEx(HKEY_USERS, "Test\\SOFTWARE", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dw); However the function always returns - "The parameter is incorrect." . If I change HKEY_USERS to HKEY_CURRENT_USER the key gets created. I can not add a new key under HKEY_USERS even when I use Regedit.exe . I am testing on a Windows XP professional PC . Can anyone tell me what is wrong? Thanks! HKEY_USERS is restricted to Admins and the OS. I'm betting you do not have sufficient privileg...

Using the "Enter" key
I've been using Money since...well forever, and do just basic tasks. However, I just bought a new PC w/Money 2005 OEM installed. The one, and most annoying, quirk for me is that in all previous versions you had the option to use the "enter" key to move between fields in the transaction form. Does anyone know if this has been disabled in 2005? Is there a way to get this function back? Thanks Steve P. In microsoft.public.money, devious7120 wrote: >I've been using Money since...well forever, and do just basic tasks. >However, I just bought a new PC w/Money 200...

Outlook Shortcuts #3
can you create a shortcut in outlook 2003 that points to a folder on the network like you could do in outlook 2000. Thanks Lynn <Lynn@discussions.microsoft.com> wrote: > can you create a shortcut in outlook 2003 that points to a folder on > the network like you could do in outlook 2000. I don't believe so. -- Brian Tillman ...

Check Box Sizing
Hi, When using check boxes, no matter how much I resize the area, the actual check box itself never gets larger (only the area for a description does). Is there any way to increase the size of the check box so that a larger check mark appears on the worksheet? Thanks, Brad. Brad, If you select "move and size with cell" (on the properties tab) then you can resize the checkbox by increasing the column width and/or row height. Give my regards to Boston. HTH, Bernie MS Excel MVP "beantownbrad" <beantownbrad@discussions.microsoft.com> wrote in message news:C63B5725-...

Doubt regarding the usage of ALT key with shortcuts
Hi all, I am new to VC++.In my application i am using two buttons and they have shortcut keys ( consider 'A' as shortcut for "&advanced" button) . The problem is I am able to operate on the button directly using the key 'A' without need to ALT + 'A'.. can anybody tell me what should i do make the shortcut key for the button work only for ALT +'A' and by not pressing just 'A'. Thanks in advance I think that's how buttons have always worked on Windows and it allows people to choose things like "Yes" or "No"...

PRODUCT KEY 04-05-10
I've just purchased this hp and the cd that was provided to me with the product key sticker on front does not work. I was under the impression that there would be some type of trial period that would allow me to use the product to determine if I want it or not. I am unable to open any documents in word on my cpu because this software has somehow locked me out of my papers for school. I can't edit copy or even view the docs w/o the product key. The product key provided is 7X4P3 Q24MX KHRKH R6CX2 G76Y4 it clearly doesn't work rather it is in lower case or upper case for...

Unable to edit PO
Hi, I am trying to edit a PO, but I get a message - "You cannot open this purchase order since it is currently saved in a purchasing batch.". I have posted all batches under Transactions >> Purchasing >> Purchasing Batches. How can I clear this? Thanks, Peter Hi PeterH: I think you or some one already entered at least one receipt against this Purchase Order. Please confirm it with the Inquiry of Purchase Order Documents. Thanks "PeterH" wrote: > Hi, > > I am trying to edit a PO, but I get a message - "You cannot open this > p...

Databound form understanding problem (how to set foreign keys automatically to new foreign entries)?
Hi, I have a typical windows form (not a grid) and like to populate a foreign key automatically on a newly created entry. I have solved this by filling the new foreign data when the id field gets changed, has a valid key value and the foreign field is empty. But it takes very long time until I get the id of the newly created TableX from dataContext. Also the form gets refreshed and does not again display the lastly created TableX entry. public void Fill() { this.tableyTableAdapter.Fill(this.MyDataSet.TableY); this.tableXTableAdapter.Fi...

Edit control height after font change
Hi all, I'm trying to change the font at runtime for some controls (textbox, combobox, ...), I did it using SetFont method. The problem I have is that comboboxes resizes themselves after font changing, modifying their height in order to contain text with the new font, and that is fine. TextBox controls, instead, don't resize themselves; I can resize their height, but I dont't know exactly which new value I should use. I can try to get font size with GetTextMetrics and add some gap value in order to calculate the height to assign to textbox controls, but I don't like this ...

Text Box Updating
I am having trouble getting a text box to auto fill from a choice made from a combo box. Combo Box Name is Address_21 Text Box Name is City_1 My code is as follows: 'Auto Fill CES Spec Written Office Private Sub Address_21_Change() Select Case Address_21 Case ""2306 Long Green Court" City_1 = "Valrico" Case ""3440 Oakcliff Road" City_1 = "Atlanta" Case "7015 East 14th Aveneue" City_1 = "Tampa" Case "1800 Taylor Drive" City_1...

Programatically creating text box
Hi all..I need help regarding creating the edit box programatically.. I have drawn a movable rectangle in a view.Now how i want to make that rectangle editable..can any body show me some pointer/sample code? I was cocoa programmer. i know how to do this in mac os..but i dont know how do i o it in MFC.. please help me I took the source code for drawing from following link : http://www.codeproject.com/miscctrl/diagrameditor.asp Thanks in advance CEdit editbox; when you need it editbox.Create(...parameters here...) and when you are done with it, editbox.DestroyWindow(); or if you want ...