Board index » delphi » Q: intercepting double-click messages in BP/Windows/OWL

Q: intercepting double-click messages in BP/Windows/OWL

I wonder if anyone could help me with the following problem:

I have a program written in Borland Pascal (target: Windows) using OWL. I want
to override the default behaviour of double clicking:

- if minimized, double clicking should start another program instead of
  restoring the program to its previous size
- if not-minimized the same action should be taken.

I have defined a procedure for the object:

    procedure DblClk (var Msg: TMessage); virtual wm_first + wm_lbuttondblclk;

but this procedure is not executed if the user double-clicks on the icon (or,
for that matter, on the restored window).

Am I doing something wrong or have I forgotten something. Any help appreciated.

Kees Pijnenburg

----------------------------------------------------------------------
Kees Pijnenburg - ke...@knoware.nl - c.pijnenb...@teknika.akzonobel.nl
                - Postbus 84  5374 ZG Schayk  The Netherlands
----------------------------------------------------------------------

 

Re:Q: intercepting double-click messages in BP/Windows/OWL


Quote
ke...@knoware.nl (Kees Pijnenburg) wrote:
>I wonder if anyone could help me with the following problem:
>I have a program written in Borland Pascal (target: Windows) using OWL. I want
>to override the default behaviour of double clicking:
>- if minimized, double clicking should start another program instead of
>  restoring the program to its previous size
>- if not-minimized the same action should be taken.
>I have defined a procedure for the object:
>    procedure DblClk (var Msg: TMessage); virtual wm_first + wm_lbuttondblclk;
>but this procedure is not executed if the user double-clicks on the icon (or,
>for that matter, on the restored window).
>Am I doing something wrong or have I forgotten something. Any help appreciated.
>Kees Pijnenburg
>----------------------------------------------------------------------
>Kees Pijnenburg - ke...@knoware.nl - c.pijnenb...@teknika.akzonobel.nl
>                - Postbus 84  5374 ZG Schayk  The Netherlands
>----------------------------------------------------------------------

I don't understand exactly what you want to do. But when you want a
window to respond to the doubleclick message you need to set in
getwindowclass the CS_DBLCLKS class style.

Re:Q: intercepting double-click messages in BP/Windows/OWL


In article <keesp.7.001B1...@knoware.nl>,
   ke...@knoware.nl (Kees Pijnenburg) wrote:
Quote
>I wonder if anyone could help me with the following problem:

>I have a program written in Borland Pascal (target: Windows) using OWL. I
want
>to override the default behaviour of double clicking:

>- if minimized, double clicking should start another program instead of
>  restoring the program to its previous size
>- if not-minimized the same action should be taken.

>I have defined a procedure for the object:

>    procedure DblClk (var Msg: TMessage); virtual wm_first +
wm_lbuttondblclk;

>but this procedure is not executed if the user double-clicks on the icon (or,
>for that matter, on the restored window).

>Am I doing something wrong or have I forgotten something. Any help
appreciated.

>Kees Pijnenburg

Are you using cs_DblClks style?
You have to assign this style to your window if you want to receive double
click messages.

Other Threads