Can you force the placement of handled events on double-click?

Can you force the placement of handled events on double-click?

Post by Lloyd Shee » Sun, 28 Dec 2008 02:57:33

I use the #region in my code to attempt to partition the code so that it is
easier to get to the code for events and to gather code in the region for
things like Drag/Drop in which there could be 3 or 4 events that handle the
overall functionallity.

Now what I am wondering (since I have not been able to find a way to do it),
is there a way to force the creation of the event stub to the current line
(where the cursor is or at least after the procedure in which the cursor is
at) within the file holding the code?

If not I will enter this request in Connect as a possible upgrade for the
next version of VS.

Thanks
LS

 
 
 

1. No Double-Click event fired for a ListView when I double click.

2. Handle double-click event in a dialog

Hi,

I have an MDI app, which contains some menus. One of the menu command
let me open a dialog box (CMyListDialog), which contains a list box
with a number of items.

I have added a double click handler (LBN_DBLCLK), which allow the user
to double click on a particular item, and then display the result in a
child frame.
On the dialog, there are also an "OK" and "Cancel" buttons. So
basically, this handler servers the same purpose as the OK button.

I am handling the OK event (when the user clicks on the OK button)
within CMainFrame, something like this:

void CMainFrame::OnPressOK()
{
CMyListDialog listDlg;
if (listDlg.DoModal() == IDOK)
{
// Code for creating new child frame
// and display selected result
}
}

In the double-click event handler, which is added for the list box in
the class CMyListDialog, is where I'm a little bit unsure. What should
I do here to return the selected item to the main frame? I have added
an event handler for the OK button, so should I just call that
function. My thinking is that since the double-clicking is effectively
the same as clicking the OK button, I can just simply call the OK
handler.

Any help would be much appreciated.

CS

3. Bug in LV 7.1's handling of double-click events.

4. userform label double-click goes to click event

5. Why does my event structure run a single click when I double-click?

6. Double click event invoked when no double click has occurred

7. Double Click event caught every other double click

8. How to distinguish Double-click and Single-Click event?

9. double click causes click-event and doubleClick-event

10. Handling double click event in tree view

11. Handling double click event

12. Force excel to start new instance when I double-click a workbook

13. PP2003: How to force slide advance on double-click?

14. Handle Double-click on <Input type="image">

15. Double-click handling