网站首页  词典首页

请输入您要查询的函数:

 

术语 createdialogparam
释义 CreateDialogParam
语法:
HWND CreateDialogParam( HINSTANCE hInstance,
LPCTSTR lpTemplateName,
HWND hWndParent,
DLGPROC lpDialogFunc,
LPARAM dwInitParam
);
CreateDialogParam功能
该CreateDialogParam函数创建一个对话框,从一个无模式对话框模板资源。之前,显示对话框,该函数传递一个应用程序定义的值作为WM_INITDIALOG消息lParam参数对话框过程。应用程序可以使用此值来初始化对话框控件。
参数
hInstance
[in]句柄模块的可执行文件包含对话框模板。
lpTemplateName
[in]指定对话框模板。此参数要么是一个空指针结尾的字符串,指定对话框的模板或一个整数值,指定对话框的资源标识符模板的名称。如果该参数指定了一个资源标识符,它的高位字必须是零和低位字必须包含标识符。您可以使用MAKEINTRESOURCE宏来创建此值。
hWndParent
[in]的窗口句柄拥有该对话框。
lpDialogFunc
[in]指向对话框过程。欲了解更多有关该对话框过程的详细信息,请参阅DialogProc。
dwInitParam
[in]指定的值传递给在WM_INITDIALOG消息中的lParam参数对话框过程。
返回值
如果函数成功,返回值是窗口句柄对话框。
如果函数失败,返回值为NULL。为了获得更多错误信息,调用GetLastError。
备注
该CreateDialogParam函数使用CreateWindowEx函数创建对话框。 CreateDialogParam然后发送一个WM_INITDIALOG消息(和一个WM_SETFONT消息,如果模板指定DS_SETFONT或DS_SHELLFONT样式)的对话框过程。函数显示对话框,如果模板指定WS_VISIBLE风格。最后,CreateDialogParam返回的窗口句柄对话框。
经过CreateDialogParam返回,应用程序显示的对话框(如果它尚未显示)使用ShowWindow函数。破坏应用程序通过使用DestroyWindow函数对话框。为了支持键盘导航和其他对话框功能,对话框的消息循环必须调用IsDialogMessage函数。
Windows 95/98/Me中:该系统可支持255个最大的对话框控件模板。放置在一个对话框,超过255个的控制,创建在WM_INITDIALOG消息处理程序的控制,而不是把他们的模板。
在Windows 95/98/Me:CreateDialogParamW是支持微软层对于Unicode。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
对话框概览的createDialog,CreateDialogIndirect,CreateDialogIndirectParam,CreateWindowEx,DestroyWindow,DialogProc,IsDialogMessage,MAKEINTRESOURCE,ShowWindow,WM_INITDIALOG,WM_SETFONT
==英文原文==CreateDialogParam Function
The CreateDialogParam function creates a modeless dialog box from a dialog box template resource. Before displaying the dialog box, the function passes an application-defined value to the dialog box procedure as the lParam parameter of the WM_INITDIALOG message. An application can use this value to initialize dialog box controls.
Syntax
HWND CreateDialogParam( HINSTANCE hInstance,
LPCTSTR lpTemplateName,
HWND hWndParent,
DLGPROC lpDialogFunc,
LPARAM dwInitParam
);
Parameters
hInstance
[in] Handle to the module whose executable file contains the dialog box template.
lpTemplateName
[in] Specifies the dialog box template. This parameter is either the pointer to a null-terminated character string that specifies the name of the dialog box template or an integer value that specifies the resource identifier of the dialog box template. If the parameter specifies a resource identifier, its high-order word must be zero and low-order word must contain the identifier. You can use the MAKEINTRESOURCE macro to create this value.
hWndParent
[in] Handle to the window that owns the dialog box.
lpDialogFunc
[in] Pointer to the dialog box procedure. For more information about the dialog box procedure, see DialogProc .
dwInitParam
[in] Specifies the value to pass to the dialog box procedure in the lParam parameter in the WM_INITDIALOG message.
Return Value
If the function succeeds, the return value is the window handle to the dialog box.
If the function fails, the return value is NULL. To get extended error information, call GetLastError .
Remarks
The CreateDialogParam function uses the CreateWindowEx function to create the dialog box. CreateDialogParam then sends a WM_INITDIALOG message (and a WM_SETFONT message if the template specifies the DS_SETFONT or DS_SHELLFONT style) to the dialog box procedure. The function displays the dialog box if the template specifies the WS_VISIBLE style. Finally, CreateDialogParam returns the window handle of the dialog box.
After CreateDialogParam returns, the application displays the dialog box (if it is not already displayed) using the ShowWindow function. The application destroys the dialog box by using the DestroyWindow function. To support keyboard navigation and other dialog box functionality, the message loop for the dialog box must call the IsDialogMessage function.
Windows 95/98/Me: The system can support a maximum of 255 controls per dialog box template. To place more than 255 controls in a dialog box, create the controls in the WM_INITDIALOG message handler rather than placing them in the template.
Windows 95/98/Me: CreateDialogParamW is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as ANSI and Unicode versions.
See Also
Dialog Boxes Overview , CreateDialog , CreateDialogIndirect , CreateDialogIndirectParam , CreateWindowEx , DestroyWindow , DialogProc , IsDialogMessage , MAKEINTRESOURCE , ShowWindow , WM_INITDIALOG , WM_SETFONT
==原始网址==http://msdn.microsoft.com/en-us/library/ms645445(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:19:58