• <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年5月>
            2526272829301
            2345678
            9101112131415
            16171819202122
            23242526272829
            303112345

            享受編程

            常用鏈接

            留言簿(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 漂漂 閱讀(1682) 評論(0)  編輯 收藏 引用 所屬分類: 深入vc++
            精品久久无码中文字幕| 午夜精品久久久内射近拍高清| 性色欲网站人妻丰满中文久久不卡| 日韩精品久久无码中文字幕| 久久精品国产精品青草| 久久综合精品国产一区二区三区| 色欲久久久天天天综合网精品 | 无码国内精品久久综合88| 亚洲午夜久久久影院伊人| 国产无套内射久久久国产| 亚洲国产另类久久久精品小说| 99久久综合国产精品二区| 久久无码人妻一区二区三区午夜| 久久精品无码一区二区三区免费| 欧美va久久久噜噜噜久久| 一级a性色生活片久久无| 国产999精品久久久久久| 久久99精品久久久久婷婷| 思思久久精品在热线热| 久久午夜福利电影| 国产精品丝袜久久久久久不卡| 99久久成人国产精品免费| 色欲久久久天天天综合网| 伊人久久无码精品中文字幕| 久久免费99精品国产自在现线 | 波多野结衣中文字幕久久| 热久久国产欧美一区二区精品 | 亚洲精品99久久久久中文字幕 | 欧美性猛交xxxx免费看久久久| 99久久精品免费看国产免费| 久久久久久久尹人综合网亚洲| 久久夜色精品国产欧美乱| 无码久久精品国产亚洲Av影片| 久久久久国产精品人妻| 久久精品aⅴ无码中文字字幕不卡| 日韩欧美亚洲综合久久 | 亚洲精品乱码久久久久久蜜桃图片 | 国内高清久久久久久| 无码人妻精品一区二区三区久久 | 久久99精品国产麻豆婷婷| 久久99国产精品成人欧美|