⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group__mouse__msgs.htm

📁 MINIGUI1.6开发API
💻 HTM
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>MiniGUI V1.6.10 API Reference: Mouse event messages</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><a class="qindex" href="index.htm">Main&nbsp;Page</a> | <a class="qindex" href="modules.htm">Modules</a> | <a class="qindex" href="classes.htm">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.htm">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.htm">Directories</a> | <a class="qindex" href="files.htm">File&nbsp;List</a> | <a class="qindex" href="functions.htm">Data&nbsp;Fields</a> | <a class="qindex" href="globals.htm">Globals</a> | <a class="qindex" href="pages.htm">Related&nbsp;Pages</a></div><h1>Mouse event messages<br><small>[<a class="el" href="group__msgs.htm">Messages</a>]</small></h1><h2>Defines</h2><ul><li>#define <a class="el" href="group__mouse__msgs.htm#ga1">MSG_LBUTTONDOWN</a>&nbsp;&nbsp;&nbsp;0x0001<dl class="el"><dd class="mdescRight">Left mouse button down message.  <a href="#ga1"></a><br></dl><li>#define <a class="el" href="group__mouse__msgs.htm#ga2">MSG_LBUTTONUP</a>&nbsp;&nbsp;&nbsp;0x0002<dl class="el"><dd class="mdescRight">Left mouse button up message.  <a href="#ga2"></a><br></dl><li>#define <a class="el" href="group__mouse__msgs.htm#ga3">MSG_LBUTTONDBLCLK</a>&nbsp;&nbsp;&nbsp;0x0003<dl class="el"><dd class="mdescRight">Left mouse button double clicked message.  <a href="#ga3"></a><br></dl><li>#define <a class="el" href="group__mouse__msgs.htm#ga4">MSG_MOUSEMOVE</a>&nbsp;&nbsp;&nbsp;0x0004<dl class="el"><dd class="mdescRight">The mouse moved message.  <a href="#ga4"></a><br></dl><li>#define <a class="el" href="group__mouse__msgs.htm#ga5">MSG_RBUTTONDOWN</a>&nbsp;&nbsp;&nbsp;0x0005<dl class="el"><dd class="mdescRight">Right mouse button down message.  <a href="#ga5"></a><br></dl><li>#define <a class="el" href="group__mouse__msgs.htm#ga6">MSG_RBUTTONUP</a>&nbsp;&nbsp;&nbsp;0x0006<dl class="el"><dd class="mdescRight">Right mouse button up message.  <a href="#ga6"></a><br></dl><li>#define <a class="el" href="group__mouse__msgs.htm#ga7">MSG_RBUTTONDBLCLK</a>&nbsp;&nbsp;&nbsp;0x0007<dl class="el"><dd class="mdescRight">Right mouse button double clicked message.  <a href="#ga7"></a><br></dl><li>#define <a class="el" href="group__mouse__msgs.htm#ga9">MSG_NCLBUTTONDOWN</a>&nbsp;&nbsp;&nbsp;0x0008<dl class="el"><dd class="mdescRight">Left mouse button down message in the non-client area.  <a href="#ga9"></a><br></dl><li>#define <a class="el" href="group__mouse__msgs.htm#ga10">MSG_NCLBUTTONUP</a>&nbsp;&nbsp;&nbsp;0x0009<dl class="el"><dd class="mdescRight">Left mouse button up message in the non-client area.  <a href="#ga10"></a><br></dl><li>#define <a class="el" href="group__mouse__msgs.htm#ga11">MSG_NCLBUTTONDBLCLK</a>&nbsp;&nbsp;&nbsp;0x000A<dl class="el"><dd class="mdescRight">Left mouse button double clicked in the non-client area.  <a href="#ga11"></a><br></dl><li>#define <a class="el" href="group__mouse__msgs.htm#ga12">MSG_NCMOUSEMOVE</a>&nbsp;&nbsp;&nbsp;0x000B<dl class="el"><dd class="mdescRight">Mouse moves in the non-client area.  <a href="#ga12"></a><br></dl><li>#define <a class="el" href="group__mouse__msgs.htm#ga13">MSG_NCRBUTTONDOWN</a>&nbsp;&nbsp;&nbsp;0x000C<dl class="el"><dd class="mdescRight">Right mouse button down message in the non-client area.  <a href="#ga13"></a><br></dl><li>#define <a class="el" href="group__mouse__msgs.htm#ga14">MSG_NCRBUTTONUP</a>&nbsp;&nbsp;&nbsp;0x000D<dl class="el"><dd class="mdescRight">Right mouse button up message in the non-client area.  <a href="#ga14"></a><br></dl><li>#define <a class="el" href="group__mouse__msgs.htm#ga15">MSG_NCRBUTTONDBLCLK</a>&nbsp;&nbsp;&nbsp;0x000E<dl class="el"><dd class="mdescRight">Right mouse button double clicked in the non-client area.  <a href="#ga15"></a><br></dl></ul><hr><h2>Define Documentation</h2><a class="anchor" name="ga3" doxytag="window.h::MSG_LBUTTONDBLCLK"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define MSG_LBUTTONDBLCLK&nbsp;&nbsp;&nbsp;0x0003          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Left mouse button double clicked message. <p>This message is posted to the window when the user double clicks the left button of the mouse in the client area of the window.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__mouse__msgs.htm#ga3">MSG_LBUTTONDBLCLK</a> <a class="code" href="group__win32__types.htm#ga4">DWORD</a> key_flags = (<a class="code" href="group__win32__types.htm#ga4">DWORD</a>)wParam; <span class="keywordtype">int</span> x_pos = <a class="code" href="group__win32__types.htm#ga24">LOSWORD</a> (lParam); <span class="keywordtype">int</span> y_pos = <a class="code" href="group__win32__types.htm#ga25">HISWORD</a> (lParam);</pre></div><p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>key_flags</em>&nbsp;</td><td>The shift key status when this message occurred. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>x_pos,y_pos</em>&nbsp;</td><td>The position of the mouse in client coordinates.</td></tr>  </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__mouse__msgs.htm#ga7">MSG_RBUTTONDBLCLK</a>, <a class="el" href="group__key__defs.htm">Macros for key codes and shift status</a> </dd></dl><p>Definition at line <a class="el" href="window_8h-source.htm#l00119">119</a> of file <a class="el" href="window_8h-source.htm">window.h</a>.    </td>  </tr></table><a class="anchor" name="ga1" doxytag="window.h::MSG_LBUTTONDOWN"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define MSG_LBUTTONDOWN&nbsp;&nbsp;&nbsp;0x0001          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Left mouse button down message. <p>This message is posted to the window when the user presses down the left button of the mouse in the client area of the window.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__mouse__msgs.htm#ga1">MSG_LBUTTONDOWN</a> <a class="code" href="group__win32__types.htm#ga4">DWORD</a> key_flags = (<a class="code" href="group__win32__types.htm#ga4">DWORD</a>)wParam; <span class="keywordtype">int</span> x_pos = <a class="code" href="group__win32__types.htm#ga24">LOSWORD</a> (lParam); <span class="keywordtype">int</span> y_pos = <a class="code" href="group__win32__types.htm#ga25">HISWORD</a> (lParam);</pre></div><p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>key_flags</em>&nbsp;</td><td>The shift key status when this message occurred. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>x_pos,y_pos</em>&nbsp;</td><td>The position of the mouse in client coordinates.</td></tr>  </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__mouse__msgs.htm#ga2">MSG_LBUTTONUP</a>, <a class="el" href="group__key__defs.htm">Macros for key codes and shift status</a></dd></dl>Example: <div class="fragment"><pre class="fragment"><span class="comment">/*</span><span class="comment"> * This example trys to handle the event when the user presses </span><span class="comment"> * left button and right button of the mouse at the same time.</span><span class="comment"> */</span><span class="keywordtype">int</span> MyWinProc (<a class="code" href="group__handles.htm#ga1">HWND</a> hWnd, <span class="keywordtype">int</span> message, <a class="code" href="group__win32__types.htm#ga8">WPARAM</a> wParam, <a class="code" href="group__win32__types.htm#ga9">LPARAM</a> lParam){    <span class="keywordflow">switch</span> (message) {        <span class="keywordflow">case</span> <a class="code" href="group__mouse__msgs.htm#ga1">MSG_LBUTTONDOWN</a>:            <span class="keywordflow">if</span> (wParam &amp; <a class="code" href="group__key__defs.htm#ga142">KS_RIGHTBUTTON</a>) {                <span class="comment">// Left button and right button both are pressed.</span>                <span class="keywordflow">break</span>;            }            <span class="keywordflow">break</span>;        <span class="keywordflow">case</span> <a class="code" href="group__mouse__msgs.htm#ga5">MSG_RBUTTONDOWN</a>:            <span class="keywordflow">if</span> (wParam &amp; <a class="code" href="group__key__defs.htm#ga141">KS_LEFTBUTTON</a>) {                <span class="comment">// Left button and right button both are pressed.</span>                <span class="keywordflow">break</span>;            }            <span class="keywordflow">break</span>;        <span class="keywordflow">case</span> <a class="code" href="group__mouse__msgs.htm#ga4">MSG_MOUSEMOVE</a>:            <span class="keywordflow">if</span> (wParam &amp; <a class="code" href="group__key__defs.htm#ga133">KS_CTRL</a>) {                <span class="comment">// User moves the mouse as the &lt;Ctrl&gt; key is down.</span>                <span class="keywordflow">break</span>;            }            <span class="keywordflow">break</span>;        ...    }    <span class="keywordflow">return</span> <a class="code" href="group__window__create__fns.htm#ga19">DefaultMainWinProc</a> (hWnd, message, wParam, lParam);}</pre></div> <p>Definition at line <a class="el" href="window_8h-source.htm#l00077">77</a> of file <a class="el" href="window_8h-source.htm">window.h</a>.    </td>  </tr></table><a class="anchor" name="ga2" doxytag="window.h::MSG_LBUTTONUP"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define MSG_LBUTTONUP&nbsp;&nbsp;&nbsp;0x0002          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Left mouse button up message. <p>This message is posted to the window when the user releases up the left button of the mouse in the client area of the window.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__mouse__msgs.htm#ga2">MSG_LBUTTONUP</a> <a class="code" href="group__win32__types.htm#ga4">DWORD</a> key_flags = (<a class="code" href="group__win32__types.htm#ga4">DWORD</a>)wParam; <span class="keywordtype">int</span> x_pos = <a class="code" href="group__win32__types.htm#ga24">LOSWORD</a> (lParam); <span class="keywordtype">int</span> y_pos = <a class="code" href="group__win32__types.htm#ga25">HISWORD</a> (lParam);</pre></div><p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>key_flags</em>&nbsp;</td><td>The shift key status when this message occurred. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>x_pos,y_pos</em>&nbsp;</td><td>The position of the mouse in client coordinates.</td></tr>  </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__mouse__msgs.htm#ga1">MSG_LBUTTONDOWN</a>, <a class="el" href="group__key__defs.htm">Macros for key codes and shift status</a> </dd></dl><p>Definition at line <a class="el" href="window_8h-source.htm#l00098">98</a> of file <a class="el" href="window_8h-source.htm">window.h</a>.    </td>  </tr></table><a class="anchor" name="ga4" doxytag="window.h::MSG_MOUSEMOVE"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define MSG_MOUSEMOVE&nbsp;&nbsp;&nbsp;0x0004          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>The mouse moved message. <p>This message is posted to the window when the user moves the mouse in the client area of the window.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__mouse__msgs.htm#ga4">MSG_MOUSEMOVE</a> <a class="code" href="group__win32__types.htm#ga4">DWORD</a> key_flags = (<a class="code" href="group__win32__types.htm#ga4">DWORD</a>)wParam; <span class="keywordtype">int</span> x_pos = <a class="code" href="group__win32__types.htm#ga24">LOSWORD</a> (lParam); <span class="keywordtype">int</span> y_pos = <a class="code" href="group__win32__types.htm#ga25">HISWORD</a> (lParam);</pre></div><p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>key_flags</em>&nbsp;</td><td>The shift key status when this message occurred. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>x_pos,y_pos</em>&nbsp;</td><td>The position of the mouse in client coordinates.</td></tr>  </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__key__defs.htm">Macros for key codes and shift status</a> </dd></dl><p>Definition at line <a class="el" href="window_8h-source.htm#l00140">140</a> of file <a class="el" href="window_8h-source.htm">window.h</a>.    </td>  </tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -