Article View: borland.public.cppbuilder.nativeapi
Article #16987Re: Doubleclick
From: user
Date: Sun, 13 Apr 2003 00:18
Date: Sun, 13 Apr 2003 00:18
14 lines
1978 bytes
1978 bytes
If I understand it correctly, the default behavior of a Windows control for a left mouse click is to send a WM_COMMAND message to its parent, along with some appropriate parameters. Because of this, you (usually) only need to handle the messages sent to the parent window, which is what you have learned and are doing. Since the control ignores double clicks by default, however, your parent window won't be getting any appropriate messages for you to handle. To get the effect you want, you can subclass the control to make respond to double clicks, as has been suggested. Alternatively, you could set up a handler in the parent window that calculates, based on the mouse coordinates when the event occurred, whether the double click occurred while your label control was under the pointer, and respond appropriately. A little easier, a little uglier.
Technical Details
Message-ID:
<3E98ACDA.6000303@domain.invalid>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e9836ec@newsgroups.borland.com> <3e987243$1@newsgroups.borland.com> <3e98910e$1@newsgroups.borland.com> <3e9892c6$1@newsgroups.borland.com> <3e989c62@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,ed946abb1e9fc00b X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-04-12 17:21:23 PST Message-ID: <3E98ACDA.6000303@domain.invalid> Date: Sat, 12 Apr 2003 20:18:34 -0400 From: user@domain.invalid User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Doubleclick References: <3e9836ec@newsgroups.borland.com> <3e987243$1@newsgroups.borland.com> <3e98910e$1@newsgroups.borland.com> <3e9892c6$1@newsgroups.borland.com> <3e989c62@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 151.201.18.183 X-Trace: newsgroups.borland.com 1050193134 151.201.18.183 (12 Apr 2003 17:18:54 -0700) Lines: 15 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail