📄 group__window__create__fns.htm
字号:
<!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: Window creating/destroying</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 Page</a> | <a class="qindex" href="modules.htm">Modules</a> | <a class="qindex" href="classes.htm">Alphabetical List</a> | <a class="qindex" href="annotated.htm">Data Structures</a> | <a class="qindex" href="dirs.htm">Directories</a> | <a class="qindex" href="files.htm">File List</a> | <a class="qindex" href="functions.htm">Data Fields</a> | <a class="qindex" href="globals.htm">Globals</a> | <a class="qindex" href="pages.htm">Related Pages</a></div><h1>Window creating/destroying<br><small>[<a class="el" href="group__window__fns.htm">Windowing functions</a>]</small></h1><h2>Modules</h2><ul><li><a class="el" href="group__window__general__fns.htm">General window operations</a><li><a class="el" href="group__sys__bmps.htm">System bitmap/icon operations</a><li><a class="el" href="group__scrollbar__fns.htm">Scroll bar operations</a><li><a class="el" href="group__class__fns.htm">Window class operations</a><li><a class="el" href="group__control__fns.htm">Control creating/destroying</a><li><a class="el" href="group__timer__fns.htm">Timer operations</a><li><a class="el" href="group__ime__fns.htm">IME Window functions</a><li><a class="el" href="group__accel__fns.htm">Accelerator operations</a><li><a class="el" href="group__caret__fns.htm">Caret operations</a><li><a class="el" href="group__menu__fns.htm">Menu operations</a><li><a class="el" href="group__dialog__fns.htm">Dialog operations</a><li><a class="el" href="group__msgbox__fns.htm">Message box operations</a></ul><h2>Data Structures</h2><ul><li>struct <a class="el" href="struct__MAINWINCREATE.htm">_MAINWINCREATE</a></ul><h2>Defines</h2><ul><li>#define <a class="el" href="group__window__create__fns.htm#ga15">HWND_DESKTOP</a> __mg_hwnd_desktop<dl class="el"><dd class="mdescRight">Desktop window handle. <a href="#ga15"></a><br></dl><li>#define <a class="el" href="group__window__create__fns.htm#ga16">HWND_NULL</a> 0<dl class="el"><dd class="mdescRight">Null window handle. <a href="#ga16"></a><br></dl><li>#define <a class="el" href="group__window__create__fns.htm#ga17">HWND_INVALID</a> 0xFFFFFFFF<dl class="el"><dd class="mdescRight">Invalid window handle. <a href="#ga17"></a><br></dl><li>#define <a class="el" href="group__window__create__fns.htm#ga18">MainWindowCleanup</a>(hwnd) MainWindowThreadCleanup(hwnd)<dl class="el"><dd class="mdescRight">Is an alias of <em>MainWindowThreadCleanup</em>. <a href="#ga18"></a><br></dl><li>#define <a class="el" href="group__window__create__fns.htm#ga19">DefaultMainWinProc</a> (<a class="el" href="group__window__create__fns.htm#ga4">__mg_def_proc</a>[0])<dl class="el"><dd class="mdescRight">Is the default main window callback procedure. <a href="#ga19"></a><br></dl><li>#define <a class="el" href="group__window__create__fns.htm#ga20">DefaultDialogProc</a> (<a class="el" href="group__window__create__fns.htm#ga4">__mg_def_proc</a>[1])<dl class="el"><dd class="mdescRight">The default dialog box procedure. <a href="#ga20"></a><br></dl><li>#define <a class="el" href="group__window__create__fns.htm#ga21">DefaultControlProc</a> (<a class="el" href="group__window__create__fns.htm#ga4">__mg_def_proc</a>[2])<dl class="el"><dd class="mdescRight">The default control callback procedure. <a href="#ga21"></a><br></dl></ul><h2>Typedefs</h2><ul><li>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>)<dl class="el"><dd class="mdescRight">Type of the window callback procedure. <a href="#ga0"></a><br></dl><li>typedef <a class="el" href="struct__MAINWINCREATE.htm">_MAINWINCREATE</a> <a class="el" href="group__window__create__fns.htm#ga2">MAINWINCREATE</a></ul><h2>Functions</h2><ul><li>MG_EXPORT int GUIAPI <a class="el" href="group__window__create__fns.htm#ga5">CreateThreadForMainWindow</a> (pthread_t *thread, pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)<dl class="el"><dd class="mdescRight">Create a thread for main window. <a href="#ga5"></a><br></dl><li>MG_EXPORT pthread_t GUIAPI <a class="el" href="group__window__create__fns.htm#ga6">GetMainWinThread</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hMainWnd)<dl class="el"><dd class="mdescRight">Get the thread id which main window belongs to. <a href="#ga6"></a><br></dl><li>MG_EXPORT int GUIAPI <a class="el" href="group__window__create__fns.htm#ga7">WaitMainWindowClose</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hWnd, void **returnval)<dl class="el"><dd class="mdescRight">Suspends execution of the calling thread which main window belongs to until the target thread terminates, unless the target thread has already terminated. <a href="#ga7"></a><br></dl><li>MG_EXPORT void GUIAPI <a class="el" href="group__window__create__fns.htm#ga8">MainWindowThreadCleanup</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hMainWnd)<dl class="el"><dd class="mdescRight">Cleans up system resource associated with a main window. <a href="#ga8"></a><br></dl><li>MG_EXPORT <a class="el" href="group__handles.htm#ga1">HWND</a> GUIAPI <a class="el" href="group__window__create__fns.htm#ga9">CreateMainWindow</a> (<a class="el" href="struct__MAINWINCREATE.htm">PMAINWINCREATE</a> pCreateStruct)<dl class="el"><dd class="mdescRight">Creates a main window. <a href="#ga9"></a><br></dl><li>MG_EXPORT <a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI <a class="el" href="group__window__create__fns.htm#ga10">DestroyMainWindow</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hWnd)<dl class="el"><dd class="mdescRight">Destroys a main window. <a href="#ga10"></a><br></dl><li>MG_EXPORT int GUIAPI <a class="el" href="group__window__create__fns.htm#ga14">DefaultWindowProc</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hWnd, int message, <a class="el" href="group__win32__types.htm#ga8">WPARAM</a> wParam, <a class="el" href="group__win32__types.htm#ga9">LPARAM</a> lParam)<dl class="el"><dd class="mdescRight">The default window callback procedure. <a href="#ga14"></a><br></dl></ul><h2>Variables</h2><ul><li>MG_EXPORT <a class="el" href="group__window__create__fns.htm#ga0">WNDPROC</a> <a class="el" href="group__window__create__fns.htm#ga4">__mg_def_proc</a> [3]<dl class="el"><dd class="mdescRight">The default window callback procedure array. <a href="#ga4"></a><br></dl></ul><hr><h2>Define Documentation</h2><a class="anchor" name="ga21" doxytag="window.h::DefaultControlProc"></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 DefaultControlProc (<a class="el" href="group__window__create__fns.htm#ga4">__mg_def_proc</a>[2]) </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>The default control callback procedure. <p>This function is the default control callback procedure. You should call this function for all messages, you do not want to handle in your own control procedure.<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>message</em> </td><td>The message identifier. </td></tr> <tr><td valign="top"></td><td valign="top"><em>wParam</em> </td><td>The first parameter of the message. </td></tr> <tr><td valign="top"></td><td valign="top"><em>lParam</em> </td><td>The second parameter of the message. </td></tr> </table></dl><p>Definition at line <a class="el" href="window_8h-source.htm#l03113">3113</a> of file <a class="el" href="window_8h-source.htm">window.h</a>. </td> </tr></table><a class="anchor" name="ga20" doxytag="window.h::DefaultDialogProc"></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 DefaultDialogProc (<a class="el" href="group__window__create__fns.htm#ga4">__mg_def_proc</a>[1]) </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>The default dialog box procedure. <p>This function is the default dialog box procedure. You should call this function in your dialog box procedure to process the unhandled messages.<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>message</em> </td><td>The message identifier. </td></tr> <tr><td valign="top"></td><td valign="top"><em>wParam</em> </td><td>The first message parameter. </td></tr> <tr><td valign="top"></td><td valign="top"><em>lParam</em> </td><td>The second message parameter.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The return value of the message handler. </dd></dl><p>Definition at line <a class="el" href="window_8h-source.htm#l03098">3098</a> of file <a class="el" href="window_8h-source.htm">window.h</a>. </td> </tr></table><a class="anchor" name="ga19" doxytag="window.h::DefaultMainWinProc"></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 DefaultMainWinProc (<a class="el" href="group__window__create__fns.htm#ga4">__mg_def_proc</a>[0]) </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Is the default main window callback procedure. <p>This function is the default main window callback procedure. You should call this function for all messages, you do not want to handle in your main window procedure.<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>message</em> </td><td>The message identifier. </td></tr> <tr><td valign="top"></td><td valign="top"><em>wParam</em> </td><td>The first parameter of the message. </td></tr> <tr><td valign="top"></td><td valign="top"><em>lParam</em> </td><td>The second parameter of the message. </td></tr> </table></dl><p>Definition at line <a class="el" href="window_8h-source.htm#l03080">3080</a> of file <a class="el" href="window_8h-source.htm">window.h</a>. </td> </tr></table><a class="anchor" name="ga15" doxytag="window.h::HWND_DESKTOP"></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 HWND_DESKTOP __mg_hwnd_desktop </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Desktop window handle. <p><p>Definition at line <a class="el" href="window_8h-source.htm#l02868">2868</a> of file <a class="el" href="window_8h-source.htm">window.h</a>. </td> </tr></table><a class="anchor" name="ga17" doxytag="window.h::HWND_INVALID"></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 HWND_INVALID 0xFFFFFFFF </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Invalid window handle. <p><p>Definition at line <a class="el" href="window_8h-source.htm#l02880">2880</a> of file <a class="el" href="window_8h-source.htm">window.h</a>. </td> </tr></table><a class="anchor" name="ga16" doxytag="window.h::HWND_NULL"></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 HWND_NULL 0 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -