• <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
            <2025年5月>
            27282930123
            45678910
            11121314151617
            18192021222324
            25262728293031
            1234567

            享受編程

            常用鏈接

            留言簿(11)

            隨筆分類(lèi)(159)

            隨筆檔案(224)

            文章分類(lèi)(2)

            文章檔案(4)

            經(jīng)典c++博客

            搜索

            •  

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            msdn的解釋?zhuān)?br>

            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 消息:
            利用標(biāo)題欄的消息,欺騙windows使得點(diǎn)擊客戶(hù)區(qū)可實(shí)現(xiàn)窗體的移動(dòng)。在打擊客戶(hù)區(qū)的時(shí)候假傳消息給windows,告訴他現(xiàn)在左擊標(biāo)題欄。

            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消息實(shí)現(xiàn)任意位置移動(dòng)窗體

            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 漂漂 閱讀(1648) 評(píng)論(0)  編輯 收藏 引用 所屬分類(lèi): 深入vc++
            亚洲国产成人乱码精品女人久久久不卡| 伊人色综合久久天天网| 国产精品午夜久久| 久久久久久久女国产乱让韩| 久久成人精品视频| 伊人久久大香线蕉综合影院首页 | 久久国产成人精品麻豆| 久久中文字幕无码专区| 精品久久久久香蕉网| 久久99这里只有精品国产| 久久亚洲国产中v天仙www | 久久久久免费精品国产| 久久久精品国产免大香伊| 国产成人综合久久精品尤物| 色偷偷久久一区二区三区| 亚洲国产成人精品无码久久久久久综合| 久久国产精品一国产精品金尊| 2021国产精品午夜久久| 久久乐国产精品亚洲综合| 91麻精品国产91久久久久| 久久精品国产亚洲精品2020 | aaa级精品久久久国产片| 久久丫忘忧草产品| 伊人色综合久久天天人守人婷 | 无码国内精品久久人妻| 午夜精品久久久久久| 久久激情五月丁香伊人| 久久福利青草精品资源站| 97久久超碰国产精品旧版| 久久精品黄AA片一区二区三区| 亚洲午夜久久久影院伊人| 精品国产乱码久久久久久人妻 | 性欧美大战久久久久久久久| 最新久久免费视频| 久久精品综合网| 一本久久a久久精品亚洲| 精品久久久无码21p发布| 久久免费看黄a级毛片| 亚洲狠狠婷婷综合久久蜜芽| 亚洲精品tv久久久久久久久| 久久国产精品无码一区二区三区 |