| |

VerySource

 Forgot password?
 Register
Search
View: 828|Reply: 4

Double-click on the title bar. What happened?

[Copy link]

2

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Invalid IP Address

Post time: 2020-2-2 09:20:01
| Show all posts |Read mode
FormDblClick does not work.
Reply

Use magic Report

0

Threads

45

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 Invalid IP Address

Post time: 2020-3-19 18:15:02
| Show all posts
No event will trigger it ...
Reply

Use magic Report

0

Threads

12

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-3-19 21:30:02
| Show all posts
Double clicking on the title bar will trigger the WM_NCLBUTTONDBLCLK message. Intercepting this message is fine.
Reply

Use magic Report

2

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Invalid IP Address

 Author| Post time: 2020-3-20 00:15:01
| Show all posts
Thank you upstairs, can you elaborate more? It is better to give a small piece of code.
Reply

Use magic Report

0

Threads

12

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-3-20 07:30:02
| Show all posts
I guess the next step is to ask how to intercept this message and answer it in advance.

In the unit file .h:
private: // User declarations
    void __fastcall WndProc (TMessage&Msg);

In the unit file .cpp:
void __fastcall TForm1 :: WndProc (TMessage&Msg)
{
    if (Msg.Msg == WM_NCLBUTTONDBLCLK)
    {
        ShowMessage ("It looks like I double-clicked the title bar");
        // If you don't want the title bar to respond to this double-click message, add the following sentence
        // return;
    }
    TForm :: WndProc (Msg);
}
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list