📄 group__dialog__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: Dialog operations</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>Dialog operations<br><small>[<a class="el" href="group__window__create__fns.htm">Window creating/destroying</a>]</small></h1><h2>Data Structures</h2><ul><li>struct <a class="el" href="struct__CTRLDATA.htm">_CTRLDATA</a><li>struct <a class="el" href="struct__DLGTEMPLATE.htm">_DLGTEMPLATE</a></ul><h2>Defines</h2><ul><li>#define <a class="el" href="group__dialog__fns.htm#ga23">DLGC_WANTARROWS</a> 0x0001<dl class="el"><dd class="mdescRight">Control wants arrow keys. <a href="#ga23"></a><br></dl><li>#define <a class="el" href="group__dialog__fns.htm#ga24">DLGC_WANTTAB</a> 0x0002<dl class="el"><dd class="mdescRight">Control wants tab keys. <a href="#ga24"></a><br></dl><li>#define <a class="el" href="group__dialog__fns.htm#ga25">DLGC_WANTALLKEYS</a> 0x0004<dl class="el"><dd class="mdescRight">Control wants all keys. <a href="#ga25"></a><br></dl><li>#define <a class="el" href="group__dialog__fns.htm#ga26">DLGC_WANTCHARS</a> 0x0008<dl class="el"><dd class="mdescRight">Want MSG_CHAR messages. <a href="#ga26"></a><br></dl><li>#define <a class="el" href="group__dialog__fns.htm#ga27">DLGC_WANTENTER</a> 0x0010<dl class="el"><dd class="mdescRight">Control wants enter keys. <a href="#ga27"></a><br></dl><li>#define <a class="el" href="group__dialog__fns.htm#ga28">DLGC_HASSETSEL</a> 0x0080<dl class="el"><dd class="mdescRight">Understands EM_SETSEL message. <a href="#ga28"></a><br></dl><li>#define <a class="el" href="group__dialog__fns.htm#ga29">DLGC_DEFPUSHBUTTON</a> 0x0100<dl class="el"><dd class="mdescRight">Default pushbutton. <a href="#ga29"></a><br></dl><li>#define <a class="el" href="group__dialog__fns.htm#ga30">DLGC_PUSHBUTTON</a> 0x0200<dl class="el"><dd class="mdescRight">Non-default pushbutton. <a href="#ga30"></a><br></dl><li>#define <a class="el" href="group__dialog__fns.htm#ga31">DLGC_RADIOBUTTON</a> 0x0400<dl class="el"><dd class="mdescRight">Radio button. <a href="#ga31"></a><br></dl><li>#define <a class="el" href="group__dialog__fns.htm#ga32">DLGC_3STATE</a> 0x0800<dl class="el"><dd class="mdescRight">3 States button item. <a href="#ga32"></a><br></dl><li>#define <a class="el" href="group__dialog__fns.htm#ga33">DLGC_STATIC</a> 0x1000<dl class="el"><dd class="mdescRight">Static item: don't include. <a href="#ga33"></a><br></dl><li>#define <a class="el" href="group__dialog__fns.htm#ga34">DLGC_BUTTON</a> 0x2000<dl class="el"><dd class="mdescRight">Button item: can be checked. <a href="#ga34"></a><br></dl><li>#define <a class="el" href="group__dialog__fns.htm#ga35">CreateMainWindowIndirect</a>(pDlgTemplate, hOwner, WndProc) CreateMainWindowIndirectParam(pDlgTemplate, hOwner, WndProc, 0)<dl class="el"><dd class="mdescRight">An simplified version of <em>CreateMainWindowIndirectParam</em>. <a href="#ga35"></a><br></dl></ul><h2>Typedefs</h2><ul><li>typedef <a class="el" href="struct__CTRLDATA.htm">_CTRLDATA</a> <a class="el" href="group__dialog__fns.htm#ga0">CTRLDATA</a><li>typedef <a class="el" href="struct__DLGTEMPLATE.htm">_DLGTEMPLATE</a> <a class="el" href="group__dialog__fns.htm#ga2">DLGTEMPLATE</a></ul><h2>Functions</h2><ul><li>MG_EXPORT <a class="el" href="group__handles.htm#ga1">HWND</a> GUIAPI <a class="el" href="group__dialog__fns.htm#ga4">CreateMainWindowIndirectParam</a> (<a class="el" href="struct__DLGTEMPLATE.htm">PDLGTEMPLATE</a> pDlgTemplate, <a class="el" href="group__handles.htm#ga1">HWND</a> hOwner, <a class="el" href="group__window__create__fns.htm#ga0">WNDPROC</a> WndProc, <a class="el" href="group__win32__types.htm#ga9">LPARAM</a> lParam)<dl class="el"><dd class="mdescRight">Uses a dialog template to create a modeless main window and controls in it, and pass a parameter to the window procedure. <a href="#ga4"></a><br></dl><li>MG_EXPORT <a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI <a class="el" href="group__dialog__fns.htm#ga5">DestroyMainWindowIndirect</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hMainWin)<dl class="el"><dd class="mdescRight">Destroys a main window created by <em>CreateMainWindowIndirectParam</em>. <a href="#ga5"></a><br></dl><li>MG_EXPORT int GUIAPI <a class="el" href="group__dialog__fns.htm#ga6">DialogBoxIndirectParam</a> (<a class="el" href="struct__DLGTEMPLATE.htm">PDLGTEMPLATE</a> pDlgTemplate, <a class="el" href="group__handles.htm#ga1">HWND</a> hOwner, <a class="el" href="group__window__create__fns.htm#ga0">WNDPROC</a> DlgProc, <a class="el" href="group__win32__types.htm#ga9">LPARAM</a> lParam)<dl class="el"><dd class="mdescRight">Creates a modal dialog box from a dialog box template in memory. <a href="#ga6"></a><br></dl><li>MG_EXPORT <a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI <a class="el" href="group__dialog__fns.htm#ga7">EndDialog</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hDlg, int endCode)<dl class="el"><dd class="mdescRight">Destroys a modal dialog box, causing MiniGUI to end any processing for the dialog box. <a href="#ga7"></a><br></dl><li>MG_EXPORT void GUIAPI <a class="el" href="group__dialog__fns.htm#ga8">DestroyAllControls</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hWnd)<dl class="el"><dd class="mdescRight">Destroys all controls in a 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__dialog__fns.htm#ga9">GetDlgDefPushButton</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hWnd)<dl class="el"><dd class="mdescRight">Gets the default push button control in a window. <a href="#ga9"></a><br></dl><li>MG_EXPORT int GUIAPI <a class="el" href="group__dialog__fns.htm#ga10">GetDlgCtrlID</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hwndCtl)<dl class="el"><dd class="mdescRight">Gets the integer identifier of a control. <a href="#ga10"></a><br></dl><li>MG_EXPORT <a class="el" href="group__handles.htm#ga1">HWND</a> GUIAPI <a class="el" href="group__dialog__fns.htm#ga11">GetDlgItem</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hDlg, int nIDDlgItem)<dl class="el"><dd class="mdescRight">Retrives the handle to a control in a dialog box. <a href="#ga11"></a><br></dl><li>MG_EXPORT <a class="el" href="group__win32__types.htm#ga6">UINT</a> GUIAPI <a class="el" href="group__dialog__fns.htm#ga12">GetDlgItemInt</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hDlg, int nIDDlgItem, <a class="el" href="group__simple__types.htm#ga0">BOOL</a> *lpTranslated, <a class="el" href="group__simple__types.htm#ga0">BOOL</a> bSigned)<dl class="el"><dd class="mdescRight">Translates the text of a control in a dialog box into an integer value. <a href="#ga12"></a><br></dl><li>MG_EXPORT int GUIAPI <a class="el" href="group__dialog__fns.htm#ga13">GetDlgItemText</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hDlg, int nIDDlgItem, char *lpString, int nMaxCount)<dl class="el"><dd class="mdescRight">Retrieves the title or text associated with a control in a dialog box. <a href="#ga13"></a><br></dl><li>MG_EXPORT char *GUIAPI <a class="el" href="group__dialog__fns.htm#ga14">GetDlgItemText2</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hDlg, int id, int *lenPtr)<dl class="el"><dd class="mdescRight">Retrieves the title or text associated with a control in a dialog box. <a href="#ga14"></a><br></dl><li>MG_EXPORT <a class="el" href="group__handles.htm#ga1">HWND</a> GUIAPI <a class="el" href="group__dialog__fns.htm#ga15">GetNextDlgGroupItem</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hDlg, <a class="el" href="group__handles.htm#ga1">HWND</a> hCtl, <a class="el" href="group__simple__types.htm#ga0">BOOL</a> bPrevious)<dl class="el"><dd class="mdescRight">Retrieves the handle to the first control in a group of controls that precedes (or follows) the specified control in a dialog box. <a href="#ga15"></a><br></dl><li>MG_EXPORT <a class="el" href="group__handles.htm#ga1">HWND</a> GUIAPI <a class="el" href="group__dialog__fns.htm#ga16">GetNextDlgTabItem</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hDlg, <a class="el" href="group__handles.htm#ga1">HWND</a> hCtl, <a class="el" href="group__simple__types.htm#ga0">BOOL</a> bPrevious)<dl class="el"><dd class="mdescRight">Retrieves the handle to the first control that has the WS_TABSTOP style that precedes (or follows) the specified control. <a href="#ga16"></a><br></dl><li>MG_EXPORT int GUIAPI <a class="el" href="group__dialog__fns.htm#ga17">SendDlgItemMessage</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hDlg, int nIDDlgItem, 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">Sends a message to the specified control in a dialog box. <a href="#ga17"></a><br></dl><li>MG_EXPORT <a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI <a class="el" href="group__dialog__fns.htm#ga18">SetDlgItemInt</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hDlg, int nIDDlgItem, <a class="el" href="group__win32__types.htm#ga6">UINT</a> uValue, <a class="el" href="group__simple__types.htm#ga0">BOOL</a> bSigned)<dl class="el"><dd class="mdescRight">Sets the text of a control in a dialog box to the string representation of a specified integer value. <a href="#ga18"></a><br></dl><li>MG_EXPORT <a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI <a class="el" href="group__dialog__fns.htm#ga19">SetDlgItemText</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hDlg, int nIDDlgItem, const char *lpString)<dl class="el"><dd class="mdescRight">Sets the title or text of a control in a dialog box. <a href="#ga19"></a><br></dl><li>MG_EXPORT void GUIAPI <a class="el" href="group__dialog__fns.htm#ga20">CheckDlgButton</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hDlg, int nIDDlgItem, int nCheck)<dl class="el"><dd class="mdescRight">Changes the check status of a button control. <a href="#ga20"></a><br></dl><li>MG_EXPORT void GUIAPI <a class="el" href="group__dialog__fns.htm#ga21">CheckRadioButton</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hDlg, int idFirstButton, int idLastButton, int idCheckButton)<dl class="el"><dd class="mdescRight">Adds a check mark to (checks) a specified radio button in a group and removes a check mark from (clears) all other radio buttons in the group. <a href="#ga21"></a><br></dl><li>MG_EXPORT int GUIAPI <a class="el" href="group__dialog__fns.htm#ga22">IsDlgButtonChecked</a> (<a class="el" href="group__handles.htm#ga1">HWND</a> hDlg, int idButton)<dl class="el"><dd class="mdescRight">Determines whether a button control has a check mark next to it or whether a three-state button control is grayed, checked, or neither. <a href="#ga22"></a><br></dl></ul><hr><h2>Define Documentation</h2><a class="anchor" name="ga35" doxytag="window.h::CreateMainWindowIndirect"></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 CreateMainWindowIndirect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">pDlgTemplate, <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>hOwner, <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>WndProc </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> CreateMainWindowIndirectParam(pDlgTemplate, hOwner, WndProc, 0)</td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>An simplified version of <em>CreateMainWindowIndirectParam</em>. <p>This macro calls <em>CreateMainWindowIndirectParam</em> with <em>lParam</em> set to be 0. <p>Definition at line <a class="el" href="window_8h-source.htm#l06792">6792</a> of file <a class="el" href="window_8h-source.htm">window.h</a>. </td> </tr></table><a class="anchor" name="ga32" doxytag="window.h::DLGC_3STATE"></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 DLGC_3STATE 0x0800 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>3 States button item. <p><p>Definition at line <a class="el" href="window_8h-source.htm#l06699">6699</a> of file <a class="el" href="window_8h-source.htm">window.h</a>. </td> </tr></table><a class="anchor" name="ga34" doxytag="window.h::DLGC_BUTTON"></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 DLGC_BUTTON 0x2000 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Button item: can be checked. <p><p>Definition at line <a class="el" href="window_8h-source.htm#l06709">6709</a> of file <a class="el" href="window_8h-source.htm">window.h</a>. </td> </tr></table><a class="anchor" name="ga29" doxytag="window.h::DLGC_DEFPUSHBUTTON"></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 DLGC_DEFPUSHBUTTON 0x0100 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Default pushbutton. <p><p>Definition at line <a class="el" href="window_8h-source.htm#l06684">6684</a> of file <a class="el" href="window_8h-source.htm">window.h</a>. </td> </tr></table><a class="anchor" name="ga28" doxytag="window.h::DLGC_HASSETSEL"></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 DLGC_HASSETSEL 0x0080 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Understands EM_SETSEL message. <p><p>Definition at line <a class="el" href="window_8h-source.htm#l06678">6678</a> of file <a class="el" href="window_8h-source.htm">window.h</a>. </td> </tr></table><a class="anchor" name="ga30" doxytag="window.h::DLGC_PUSHBUTTON"></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 DLGC_PUSHBUTTON 0x0200 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Non-default pushbutton. <p><p>Definition at line <a class="el" href="window_8h-source.htm#l06689">6689</a> of file <a class="el" href="window_8h-source.htm">window.h</a>. </td> </tr></table><a class="anchor" name="ga31" doxytag="window.h::DLGC_RADIOBUTTON"></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 DLGC_RADIOBUTTON 0x0400 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Radio button. <p><p>Definition at line <a class="el" href="window_8h-source.htm#l06694">6694</a> of file <a class="el" href="window_8h-source.htm">window.h</a>. </td> </tr></table><a class="anchor" name="ga33" doxytag="window.h::DLGC_STATIC"></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 DLGC_STATIC 0x1000 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Static item: don't include. <p><p>Definition at line <a class="el" href="window_8h-source.htm#l06704">6704</a> of file <a class="el" href="window_8h-source.htm">window.h</a>. </td> </tr></table><a class="anchor" name="ga25" doxytag="window.h::DLGC_WANTALLKEYS"></a><p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -