How to block double click in overridden WndProc function in Windows Forms?

后端 未结 5 1704
名媛妹妹
名媛妹妹 2021-01-13 20:00

I have a form created in Windows Forms which is draggable wherever I click. I made it by overriding WndProc function which in turn modifies each click as it was a title bar

5条回答
  •  太阳男子
    2021-01-13 20:19

    I was having the same problem today in C++. I used JaredPar's solution but with WM_NCLBUTTONDBLCLK (0x00A3) instead of WM_LBUTTONDBLCLK, that did the trick for me! It's working because the double click message is being sent from a non-client (NC) area, which is the "virtual" title bar (HTCAPTION) in this case.

提交回复
热议问题