• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆 - 224  文章 - 41  trackbacks - 0
            <2010年6月>
            303112345
            6789101112
            13141516171819
            20212223242526
            27282930123
            45678910

            享受編程

            常用鏈接

            留言簿(11)

            隨筆分類(159)

            隨筆檔案(224)

            文章分類(2)

            文章檔案(4)

            經典c++博客

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            msdn的解釋:

            The WM_NCLBUTTONDOWN message is posted when the user presses the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.

            使用WM_NCLBUTTONDOWN 消息:
            利用標題欄的消息,欺騙windows使得點擊客戶區可實現窗體的移動。在打擊客戶區的時候假傳消息給windows,告訴他現在左擊標題欄。

            void CDragWindowDlg::OnLButtonDown(UINT nFlags, CPoint point)
            {
             // TODO: Add your message handler code here and/or call default
             PostMessage(WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM(point.x, point.y));
             CDialog::OnLButtonDown(nFlags, point);
            }

            C# 使用WM_NCLBUTTONDOWN消息實現任意位置移動窗體

            public const int WM_NCLBUTTONDOWN = 0xA1;
                   public const int HT_CAPTION = 0x2;
                [DllImportAttribute("user32.dll")]
              public static extern int SendMessage(IntPtr hWnd,
                            int Msg, int wParam, int lParam);
            [DllImportAttribute("user32.dll")]
             public static extern bool ReleaseCapture();

              private void Form1_MouseDown(object sender, MouseEventArgs e)
              {
                if (e.Button == MouseButtons.Left)
            {
              if ((e.Clicks == 1))
            {
            ReleaseCapture();

            SendMessage(this.Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
             }

             }

             }
            posted on 2010-03-18 10:40 漂漂 閱讀(1667) 評論(0)  編輯 收藏 引用 所屬分類: 深入vc++
            久久夜色撩人精品国产| AAA级久久久精品无码区| 无码任你躁久久久久久老妇App| 欧美无乱码久久久免费午夜一区二区三区中文字幕 | 国产精品久久精品| 国产激情久久久久影院老熟女免费| 国内精品久久久久久久久电影网| 久久中文字幕无码专区| 色欲久久久天天天综合网| 精品无码久久久久国产| 久久99精品国产麻豆蜜芽| 久久久女人与动物群交毛片| 久久成人国产精品一区二区| 99精品久久精品一区二区| 久久99精品久久久久久秒播| 久久99久国产麻精品66| 久久精品成人免费国产片小草| 青青草原精品99久久精品66| 国产精品日韩欧美久久综合| av国内精品久久久久影院| 久久久久一本毛久久久| 亚洲精品国产成人99久久| 久久久久无码精品国产不卡| 久久无码AV一区二区三区| 久久人人超碰精品CAOPOREN| 久久亚洲国产欧洲精品一| 亚洲精品tv久久久久久久久| 久久九九久精品国产免费直播| 久久久久99精品成人片| 国产亚州精品女人久久久久久| 97久久超碰国产精品旧版| 色欲久久久天天天综合网精品 | 精品多毛少妇人妻AV免费久久| 久久久久人妻一区二区三区vr| 久久久亚洲欧洲日产国码aⅴ| 久久久久国产精品嫩草影院| 要久久爱在线免费观看| 亚洲美日韩Av中文字幕无码久久久妻妇| 亚洲国产精久久久久久久| 久久综合久久久| 国产巨作麻豆欧美亚洲综合久久|