📄 group__window__general__fns.htm
字号:
</td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Retrives the hosting main window of a main window. <p>This function retrives the hosting main window of the specified main window <em>hWnd</em>. The hosting main window creates the message queue, which shared with all hosted main window of it. The hosting window of a top-level main window is HWND_DESKTOP.<p>HWND_DESKTOP has no hosting window, do not use this function for it.<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>hMainWnd</em> </td><td>The handle to the main window.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the hosting main window. A valid window must have a hosting window. If error occurs, such as a invalid handle or HWND_DESKTOP is passed as <em>hMainWnd</em>, HWND_INVALID is returned.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__window__general__fns.htm#ga50">GetFirstHosted</a>, <a class="el" href="group__window__general__fns.htm#ga51">GetNextHosted</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga44" doxytag="window.h::GetMainWindowHandle"></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"><a class="el" href="group__handles.htm#ga1">HWND</a> GUIAPI GetMainWindowHandle </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga1">HWND</a> </td> <td class="mdname1" valign="top" nowrap> <em>hWnd</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Retrives the handle to the main window contains a window. <p>This function retrives the handle to the main window which contains the specified window <em>hWnd</em>.<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>hWnd</em> </td><td>The handle to the window. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the main window, HWND_INVALID indicates an error.</dd></dl><dl compact><dt><b>Note:</b></dt><dd>For a main window, this function always returns the handle to itself. For HWND_DESKTOP, HWND_DESKTOP is returned.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__window__general__fns.htm#ga43">GetParent</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga47" doxytag="window.h::GetNextChild"></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"><a class="el" href="group__handles.htm#ga1">HWND</a> GUIAPI GetNextChild </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga1">HWND</a> </td> <td class="mdname" nowrap> <em>hWnd</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="group__handles.htm#ga1">HWND</a> </td> <td class="mdname" nowrap> <em>hChild</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Retrives the next control in a window. <p>This function retrives the next child of the specified window <em>hWnd</em>. If you pass 0 for the argument of <em>hChild</em>, the function will return the first child of the window.<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>hWnd</em> </td><td>The handle to the window. </td></tr> <tr><td valign="top"></td><td valign="top"><em>hChild</em> </td><td>The handle to a child of the window. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle of the next child. If you pass HWND_NULL for the argument of <em>hChild</em>, it will return the first child of the window. When the child you passed is the last one, this function will return 0. If hWnd is not the parent of hChild, this function will return HWND_INVALID.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__window__general__fns.htm#ga48">GetNextMainWindow</a></dd></dl><dl compact><dt><b>Note:</b></dt><dd>Do not use HWND_DESKTOP for <em>hWnd</em> or <em>hChild</em>.</dd></dl>Example:<p><div class="fragment"><pre class="fragment"><span class="comment">/*</span><span class="comment"> * Sample code for GetNextChild:</span><span class="comment"> * Travles all child of a window \a hWnd.</span><span class="comment"> */</span><a class="code" href="group__handles.htm#ga1">HWND</a> child = <a class="code" href="group__window__create__fns.htm#ga15">HWND_DESKTOP</a>;<span class="keywordflow">do</span> { child = <a class="code" href="group__window__general__fns.htm#ga47">GetNextChild</a> (hWnd, child);} <span class="keywordflow">while</span> (child != <a class="code" href="group__window__create__fns.htm#ga15">HWND_DESKTOP</a>);</pre></div> </td> </tr></table><a class="anchor" name="ga51" doxytag="window.h::GetNextHosted"></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"><a class="el" href="group__handles.htm#ga1">HWND</a> GUIAPI GetNextHosted </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga1">HWND</a> </td> <td class="mdname" nowrap> <em>hHosting</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="group__handles.htm#ga1">HWND</a> </td> <td class="mdname" nowrap> <em>hHosted</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Retrives the next hosted main window of a main window. <p>This function retrives the next hosted main window of the specified main window <em>hHosting</em>.<p>For MiniGUI-Threads, HWND_DESKTOP has no any "hosted" window, so do not use this function for it.<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>hHosting</em> </td><td>The handle to the hosting main window. </td></tr> <tr><td valign="top"></td><td valign="top"><em>hHosted</em> </td><td>The handle to a known hosted main window. This function will return the next hosted main window.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>Handle to the next hosted main window. Returns 0 when <em>hHosted</em> is the last hosted main window; HWND_INVALID when error occurs. If <em>hHosted</em> is 0, this call equals GetFirstHosted(hHosting). If an invalid window handle is passed as <em>hHosting</em> or <em>hHosted</em>, HWND_INVALID will be returned; If <em>hHosted</em> is not the hosted window of <em>hHosting</em>, HWND_INVALID will be returned.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__window__general__fns.htm#ga50">GetFirstHosted</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga48" doxytag="window.h::GetNextMainWindow"></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"><a class="el" href="group__handles.htm#ga1">HWND</a> GUIAPI GetNextMainWindow </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga1">HWND</a> </td> <td class="mdname1" valign="top" nowrap> <em>hMainWnd</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Retrives the next main window in the system according to the zorder. <p>This function retrives the next main window of the specified main window <em>hMainWnd</em>.<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>hMainWnd</em> </td><td>The handle to the main window.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle of the next main wind
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -