Having Trouble Adding VK_DELETE processing to a ListBox

This function allows me to add keyboard processing to my DialogBox.
The <Insert> key works correctly, the <Delete> seems to invoke OnDeleteListBox() 

BOOL MultiFontDialog::PreTranslateMessage(MSG* pMsg)
  if (pMsg->wParam == VK_INSERT) {
    return TRUE;
  else if (pMsg->wParam == VK_DELETE) {
    return TRUE;
  return CDialog::PreTranslateMessage(pMsg);

NoSpam8358 (375)
3/16/2007 4:35:47 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 27

"Peter Olcott" <NoSpam@SeeScreen.com> wrote in message 
> This function allows me to add keyboard processing to my DialogBox.
> The <Insert> key works correctly, the <Delete> seems to invoke 
> OnDeleteListBox() twice.
> BOOL MultiFontDialog::PreTranslateMessage(MSG* pMsg)
> {
//  I forgot to screen for WM_KEYDOWN messages, thus it got
//  invoked a second time on the WM_KEYUP message.
  if (pMsg->message != WM_KEYDOWN)
    return CDialog::PreTranslateMessage(pMsg);

>  if (pMsg->wParam == VK_INSERT) {
>    OnInsertListBox();
>    return TRUE;
>  }
>  else if (pMsg->wParam == VK_DELETE) {
>    OnDeleteListBox();
>    return TRUE;
>  }
>  return CDialog::PreTranslateMessage(pMsg);
> }

NoSpam8358 (375)
3/16/2007 4:46:25 PM

Similar Artilces:

Can't See New Public Folders on Just Added Backend Exchange Server
I recently added a new exchange server to an existing site,admin group, routing group. I am running in native mode. Now when I create new public folders on the new server, my clients are not seeing it (all client mailboxes are on the first server). It has been several hours now and they are still not visible. Any ideas? Thanks, tke042 ...

Adding something to a complicated formula
Hey peeps! I have a formula that turns the cell red if the number of received items is less than the number ordered, and only if the scheduled date they were to come in is past today's date. I would like to add in the formula the ability to recognize in the ordered and recieved column if I needed to order more at a later date, or if I received the total items at different times...like 11+3 in the ordered column, meaning I ordered 11, realized I needed more and ordered 3 more. Can I make a formula to recognize this additional requirement? Here is the original formula I have in the cell...

Adding interest payments to existing IRA accounts
I can not find location to add monthly interest payments to my IRA accounts. I am NOT adding investment money just interest. This is a very frustrating unfriendly program to try and use especially since there appears to be no book to go along with it. Quickbooks is a terrific program but does not allow household and business dual applications. Anyone have any other suggestions? Assuming the IRA is setup as an investment cash account, enter a transaction for Investment Income:Interest or similar category. If it's from, say, a money market fund that's setup as a investment and is...

Ad downloads
Why is it that my MSMo3 has started downloading icons for banks and stock brokers to my website. This happens everytime I download my statements from my bank. It is the same icons and neither of them are banks that I deal with. MLWEST Correction..The downloaded icons come to my desktop. In microsoft.public.money, mlw734 wrote: >Why is it that my MSMo3 has started downloading icons for banks and >stock brokers to my website. This happens everytime I download my >statements from my bank. It is the same icons and neither of them are >banks that I deal with. Click Tools->...

Wait for Timer and Sales Process
Hi, I pretend to do something I dont even know if is possible so your help is great on: Tell me if this is possible to do? And if yes, how? Just with development? And the cenario is: My Sales Process has 4 stages (1,2,3 and 4) so I want to define a maximum duration of each stage (for example: stage 1 can take as long as 3 days, Stage 2 as 4 days, Stage 3 as 2 days and Stage 4 as 1 day too). The duration of each stage should start from the moment the previously stage is completed. So imagine I close the Stage 1 after the first day, then the Stage 2 duration should start counting from t...

Outlook 2000/2003 MAPI Logon Process
Does anyone have the details of the Outlook 2000/2003 MAPI logon process? Specifically I am trying to find out if Outlook updates free/busy information in the public folders upon startup. ...

Help with Building Template, Repeatable Process
I've got a survey tool that exports survey results as Excel. It puts each question on a seperate worksheet tab. The export always has the same naming scheme and structure everytime. I can't change the survey export. So my tabs looks like: Question_1 Question_2 Question_3.... I created a "Master Summary" worsksheet that summarizes the results of each question tab onto one page. So my cell references look like: ='Question_1'!A6 ='Question_2'!A6 ='Question_3'!A6... The problem is that I cannot come up with a process by which I can export a fresh file...

Print Item Number Ole object on Sales Order Processing reports
Would like the ability to print an Item Number Ole object on my SOP reports. For example, go to Transactions, Sales, Sales Transaction Entry. In the Sales Transaction Entry window, enter an Order for an Item. Click the Item Number Note button. Once you are in the Note window, click the paperclip button to add an Ole Object. In the OLE Container window, click Edit, and then click Insert New Object. In the next widow click Create from File. This is where you will attach an existing object (such as an image or text file). Close the window and save your changes. Click Attach to atta...

Open IE seperate process and seperate window
Ok, here is a good puzzle. I need to automate opening two IE (independent windows) on two monitors. Here is the reason: I have a security guard that has to monitor two 16 channel DVR windows 24/7 and if the power fails, and / or the system is rebooted, needs to open and logon automatically without keyboard interaction. (keyboard / mouse has been removed). Here is the setup: I have two Security Camera systems (DVR) that have web interfaces. I have a computer setup with dual monitors I have the system to auto logon. I can manually open new IE sessions in seperate windows, then...

Multiple selections in Listbox
I have 2 Excel VBA questions: 1) Is it possible to choose multiple items in a List Box and if so, 2) how can I use those selected items in a macro (which variable type should I use?) For example. I have selected three country in a listbox and I want to print the sales results of each of those three countries. Asume in this case that I use for each country one worksheet. Your suggestions and tips are very appreciated! Thanks! Best regards, Christiaan Hi there, It depends on what kind of listbox you have created. If you have created one from the Controls Toolbox menu (an ActiveX c...

trouble printing entire workbook with different page layouts
I have a workbook with about 10 worksheets. Some are setup to print "portrait" and some print "landscape". In previous versions of Excel, I had no problem printing this type of workbook - the pages work print according to thje page setup for each worksheet. In Office XP the landscape pages print in different layouts - some print on 2 halves of portrait, others reduce to fit the page! I have tried using the macro from Microsoft, but it doesn't work. Does anybody have a solution that works? The printing of workbooks, with some sheets set for portrait and others fo...

Adding columns given a match
Hello, I have 2 tables with different data, except for a member ID column. Table A has 38,000 records with about 35 columns. Table B has 3,000 records, with about 9 columns. I need to read table B, scan table A with the member ID from table B and add the 3 last cells from table B to table A for that member. I have a general idea how to do it, but that's about it. I need help. Any suggestions will be greatly appreciated. Thanks much in advance, Cefoxtrot Simplest technique is INDEX/MATCH. This link will probably be broken by the forum, but remove the breaks to make one long line ag...

What's the best way to set up a table so rows can be added?
This comes up all the time. I need to create a table with a header row, some variable number of data rows, and a totals row. These tables get rows added from time to time, sometimes at the top, sometimes in the middle, and sometimes at the bottom. The problem A B C 1 Project Hours Total 2 Project A 0.50 $20.00 3 Project B 1.25 $50.00 4 Project C 2.25 $90.00 5 Subtotal 4.00 $160.00 If I insert a row by right-clicking and choosing Insert, the sums will adjust except for row 2. It I insert a row using Copy+Insert (Ctrl-Shift-...

Error when closing Process Server
I am getting an error when closing the Process Server. The error title bar: DDE Server Window: Dynamics.exe - Application Error Error Message: The exception unknown software exception (0xc00200001) occurred in the application at location 0x77e4bee7. Click on OK to terminate the program Has anyone seen this error before, or know how to correct? Windows 2003 Server, GP10 sp2... ...

Trouble launching Office apps
Hi: I recently purchased a 17" G4 laptop and can't get any of Microsoft office X applications to launch. 1. In Jaguar I removed the Office v.X Test Drive with the Remove app. 2. Then I install Office v.X and get this error message. "Microsoft Word (any office program) cannot load the Microsoft Office Shared Libraries. The files may have been moved from the original locations. Try the following: Move Word back to the Microsoft Office folder (or to where it ws originally installed) OR Reinstall Word to make sure that all files are installed correctly." I then do remo...

WinWord.exe Process won't shutdown
We are running an Office 2000 package. The end users like to use Word as their e-mail editor. When they start a new e-mail, WinWord.exe runs as a process. When the e- mail is sent or closed, WinWord.exe continues to run in the background. In order to get it to shutdown, you have to do it through task manager. This is becoming a problem because the process is creating other problems with user software. Is there a way to shutdown winword.exe by sending the e-mail? Is there a fix or is Microsoft even aware of the issue? Randy ...

Drag and drop between ListBoxes
I have a Form with two ListBoxes on either side of a SplitContainer control. Each ListBox has a number of strings in it. I need to be able to move strings between the two at will. However, the built in drag and drop functionality seems very, very, limited (ie, nothing more than functionally useless cursor changes and additional events that would be easily attainable without built in dragging and dropping). I am having issues with removing the old data from the original ListBox. I tried {source ListBox}.Remove({data that was dragged}); in the DragDrop event but it only works s...

Add Record to Subform using a Listbox
I have a Form with a Subform. The Form contains a multi-select List Box for selection of records to add to the Subform. I can’t seem to get the code right to accomplish this. Any help would be very much appreciated. FrmEvents (contains List Box: “lstDefs” & subform: “frmSubEventDef”) Record Source: q_frm_event Primary key: EventNo lstDefs (Unbound) Field 1: DefNo Field 2: Defintion Multi-Select: Extended frmSubEventDef Record Source: q_frm_event_defs Field 1: EventNo Field 2: DefNo Link Child Fields: EventNo Link Master Fields: EventNo On selection of specific row(s) in lstDefs, th...

Inserting SOP Process Holds
I am attempting to insert an SOP process hold through an eConnect post-procedure, which I have successfully done, but find an issue within the user interface. Despite the user click to remove the process hold and entering the password for that hold, the process hold remains. It does not error or give any message, it simply remains. Would anyone know how to use a direct table insert for an SOP process hold? At this point, I do an insert into SOP10104 only. Is there another table I need to be updating/inserting? I would insert the hold with eConnect, except that it is a credit hold check and...

HELP with adding email accounts
I have Outlook 2000 and I am trying to add email accounts for my various businesses. I can add one and the other two give me the error message 0x800ccc0d. I run Windows XP and I am on DSL. Can anyone advise? Hi Wendy, WORKAROUND To work around this problem, use one of the following methods, depending on your situation. Method 1: Confirm that your e-mail server settings are correct For information about the correct settings for your e-mail server, contact your Internet service provider (ISP) or system administrator. Note Some ISPs do not permit message routing through another SMTP ser...

I'm trying to sync an audio book to a Coby MP725-4G. It is supposed to support WMDRM10. I can play the audio book under WMP12, and the usage rights indicate that I have 2 syncs to a portable device. The audio books can have a few hundred individual files. When I try to sync a file to the device, it works just fine. However, now all my files report that there is only 1 sync to portable devices left. If I sync another file, it also works, but now the files all report 0 syncs to portable device. From this point, obviously, I cannot sync anymore. I can listen to the 2 fil...

How to get out of a listbox?
Hi! Need a little help please. Question, how do I terminate/close the listbox after the user made one selection? My code filling up a the listbox and calling a Userform1 Thank's ahead for any pointers. Sub slist() i = 1 For Each ws In Worksheets UserForm1.ListBox1.AddItem (Worksheets(i).Name) i = i + 1 Next ws UserForm1.Show End Sub Userform1 code:---------------------------------------- Private Sub ListBox1_Click() Sheets(UserForm1.ListBox1.Value).Select End Sub Not sure I have got the problem, but maybe try Sub slist() i = 1 Userform1.Listbox1.Clear For Each ws In Wor...

Dropdowns to Activex listboxes
Hi All, I have 8 dropdown boxes on a worksheet that reference an array (A5:A12 on a different worksheet (Player Array) and once a team is selecte form the dropdown the team members are added into the sheet auto, wha I want to do is change the dropdowns for activex listboxes so I hav more control over the properties ie: font size. How can I do this :( I can get the listboxes there but I cant seem t get them referencing the array. If you need a copy of the file pleas let me know. Any help much appreciated Thanks Ro -- Message posted from http://www.ExcelForum.com Open the Control toolbox,...

03 Outlook process continues after exit
After exiting outlook 2003, the outlook.exe process continues to run. Upon trying to relaunch outlook, nothing happens until after deleting outlook.exe process in task manager. Any help out there? ...

adding a new user to email
okay so i have tried so many time to add my husband onto outlook email but for some reason it will not allow me to do so and it really is driving me mad! this is the steps i am taking... Does he have a separate account? Have you added this account from Control Panel->Mail Icon? What version of Outlook are you using? BTW - the steps you listed are going to elicit the same problem every time. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the SWEN virus, all mail sent to my personal account will be deleted without reading. A...