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

📄 group__window__create__fns.htm

📁 MINIGUI1.6开发API
💻 HTM
📖 第 1 页 / 共 3 页
字号:
    </td>    <td><p>Null window handle. <p><p>Definition at line <a class="el" href="window_8h-source.htm#l02874">2874</a> of file <a class="el" href="window_8h-source.htm">window.h</a>.    </td>  </tr></table><a class="anchor" name="ga18" doxytag="window.h::MainWindowCleanup"></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 MainWindowCleanup          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">hwnd&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;MainWindowThreadCleanup(hwnd)</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Is an alias of <em>MainWindowThreadCleanup</em>. <p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__window__create__fns.htm#ga8">MainWindowThreadCleanup</a> </dd></dl><p>Definition at line <a class="el" href="window_8h-source.htm#l02989">2989</a> of file <a class="el" href="window_8h-source.htm">window.h</a>.    </td>  </tr></table><hr><h2>Typedef Documentation</h2><a class="anchor" name="ga2" doxytag="window.h::MAINWINCREATE"></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">typedef struct <a class="el" href="struct__MAINWINCREATE.htm">_MAINWINCREATE</a> <a class="el" href="struct__MAINWINCREATE.htm">MAINWINCREATE</a>          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Structure defines a main window.     </td>  </tr></table><a class="anchor" name="ga0" doxytag="window.h::WNDPROC"></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">typedef int(* <a class="el" href="group__window__create__fns.htm#ga0">WNDPROC</a>)(<a class="el" href="group__handles.htm#ga1">HWND</a>, int, <a class="el" href="group__win32__types.htm#ga8">WPARAM</a>, <a class="el" href="group__win32__types.htm#ga9">LPARAM</a>)          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Type of the window callback procedure. <p><p>Definition at line <a class="el" href="window_8h-source.htm#l02860">2860</a> of file <a class="el" href="window_8h-source.htm">window.h</a>.    </td>  </tr></table><hr><h2>Function Documentation</h2><a class="anchor" name="ga9" doxytag="window.h::CreateMainWindow"></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 CreateMainWindow           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="struct__MAINWINCREATE.htm">PMAINWINCREATE</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>pCreateStruct</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Creates a main window. <p>This function creates a main window by using information in the structure pointed to by <em>pCreateStruct</em>, and returns the handle to the main 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>pCreateStruct</em>&nbsp;</td><td>The pointer to a MAINWINCREATE structure. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the new main window; HWND_INVALID indicates an error.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__window__create__fns.htm#ga2">MAINWINCREATE</a>, <a class="el" href="group__styles.htm">Window styles</a></dd></dl>Example:<p><div class="fragment"><pre class="fragment"><span class="comment">/*</span><span class="comment"> * The following code initializes a MAINWINCREATE struct and then</span><span class="comment"> * creates a main window.</span><span class="comment"> */</span>{    <a class="code" href="struct__MAINWINCREATE.htm">MAINWINCREATE</a> CreateInfo;    <a class="code" href="group__handles.htm#ga1">HWND</a> hWnd;    <span class="comment">/* Initialize the MAINWINCREATE structure. */</span>    CreateInfo.<a class="code" href="struct__MAINWINCREATE.htm#o0">dwStyle</a> = <a class="code" href="group__styles.htm#ga6">WS_VISIBLE</a> | <a class="code" href="group__styles.htm#ga14">WS_VSCROLL</a> | <a class="code" href="group__styles.htm#ga15">WS_HSCROLL</a> | <a class="code" href="group__styles.htm#ga4">WS_CAPTION</a>;    CreateInfo.<a class="code" href="struct__MAINWINCREATE.htm#o2">spCaption</a>= <span class="stringliteral">"MiniGUI step three"</span>;    CreateInfo.<a class="code" href="struct__MAINWINCREATE.htm#o1">dwExStyle</a> = <a class="code" href="group__styles.htm#ga20">WS_EX_NONE</a>;    CreateInfo.<a class="code" href="struct__MAINWINCREATE.htm#o3">hMenu</a> = createmenu();    CreateInfo.<a class="code" href="struct__MAINWINCREATE.htm#o4">hCursor</a> = <a class="code" href="group__cursor__fns.htm#ga4">GetSystemCursor</a>(0);    CreateInfo.<a class="code" href="struct__MAINWINCREATE.htm#o5">hIcon</a> = 0;    CreateInfo.<a class="code" href="struct__MAINWINCREATE.htm#o7">MainWindowProc</a> = MainWinProc;    CreateInfo.<a class="code" href="struct__MAINWINCREATE.htm#o8">lx</a> = 0;    CreateInfo.<a class="code" href="struct__MAINWINCREATE.htm#o9">ty</a> = 0;    CreateInfo.<a class="code" href="struct__MAINWINCREATE.htm#o10">rx</a> = 640;    CreateInfo.<a class="code" href="struct__MAINWINCREATE.htm#o11">by</a> = 480;    CreateInfo.<a class="code" href="struct__MAINWINCREATE.htm#o12">iBkColor</a> = <a class="code" href="group__color__vars.htm#ga36">COLOR_lightwhite</a>;    CreateInfo.<a class="code" href="struct__MAINWINCREATE.htm#o13">dwAddData</a> = 0;    CreateInfo.<a class="code" href="struct__MAINWINCREATE.htm#o6">hHosting</a> = <a class="code" href="group__window__create__fns.htm#ga15">HWND_DESKTOP</a>;    <span class="comment">/* Create the main window. */</span>    hWnd = <a class="code" href="group__window__create__fns.htm#ga9">CreateMainWindow</a>(&amp;CreateInfo);    <span class="keywordflow">if</span> (hWnd == <a class="code" href="group__window__create__fns.htm#ga17">HWND_INVALID</a>)        <span class="keywordflow">return</span> 0;}</pre></div>     </td>  </tr></table><a class="anchor" name="ga5" doxytag="window.h::CreateThreadForMainWindow"></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">int GUIAPI CreateThreadForMainWindow           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">pthread_t *&nbsp;</td>          <td class="mdname" nowrap> <em>thread</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>pthread_attr_t *&nbsp;</td>          <td class="mdname" nowrap> <em>attr</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>void *(*)(void *)&nbsp;</td>          <td class="mdname" nowrap> <em>start_routine</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>void *&nbsp;</td>          <td class="mdname" nowrap> <em>arg</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Create a thread for main window. <p><dl compact><dt><b>See also:</b></dt><dd>pthread_create </dd></dl>    </td>  </tr></table><a class="anchor" name="ga14" doxytag="window.h::DefaultWindowProc"></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">int DefaultWindowProc           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga1">HWND</a>&nbsp;</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>int&nbsp;</td>          <td class="mdname" nowrap> <em>message</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="group__win32__types.htm#ga8">WPARAM</a>&nbsp;</td>          <td class="mdname" nowrap> <em>wParam</em>, </td>

⌨️ 快捷键说明

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