CreateDialog Function
来源:互联网 发布:广场舞 知乎 编辑:程序博客网 时间:2024/06/02 04:25
语法
HWND CreateDialog( __in HINSTANCE hInstance, __in LPCTSTR lpTemplate, __in HWND hWndParent, __in DLGPROC lpDialogFunc);
HWND CreateDialog( __in HINSTANCE hInstance, __in LPCTSTR lpTemplate, __in HWND hWndParent, __in DLGPROC lpDialogFunc);
参数
- hInstance [in]
- HINSTANCE
包含对话框模板资源的可执行文件句柄.
- lpTemplate [in]
- LPCTSTR
指定对话框模板. 这个参数不是一个指向表示对话框模板资源的NULL结尾的字符串就是一个表示对话框模板标识符的整数。如果是一个整数,它的高字节必须是0,低字节必须是资源标识符。你可以用MAKEINTRESOURCE宏来创建这个值。
hWndParent [in]
- HWND
拥有这个对话框的窗口句柄
lpDialogFunc [in]
- DLGPROC
指向一个对话框过程. For more information about the dialog box procedure, see DialogProc.
Return Value
HWND
If the function succeeds, the return value is the handle to the dialog box.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
This function typically fails for one of the following reasons:
- an invalid parameter value
- the system class was registered by a different module
- The WH_CBT hook is installed and returns a failure code
- if one of the controls in the dialog template is not registered, or its window window procedure fails WM_CREATE or WM_NCCREATE
Remarks
The CreateDialog function uses the CreateWindowEx function to create the dialog box. CreateDialog 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, CreateDialog returns the window handle to the dialog box.
After CreateDialog returns, the application displays the dialog box (if it is not already displayed) by 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.
Examples
For an example, see Creating a Modeless Dialog Box.
- CreateDialog Function
- createDialog
- CreateDialog和DialogBox
- CreateDialog和DialogBox
- CreateDialog和DialogBox
- win32 CreateDialog和DialogBox
- Win32API:CreateDialog、DialogBox、DialogProc
- CreateDialog Tab Control 点击两次才能切换
- win32窗口创建 之 CreateDialog和DialogBox
- Function
- function
- function
- function $()
- Function
- function
- Function
- $(function(){...});
- function
- 批量执行linux文件夹下的各个shell文件
- WINCE6.0 远程工具,不能使用ActiveSync连接的问题
- java之父离弃甲骨文进入谷歌(网络转载)
- vim插件大全
- 如何调用MKL
- CreateDialog Function
- Android学习笔记(十八):ListView和RatingBar
- dvexpress 获取项值
- TRK下载地址
- 一段代码, 搞明白Java中的for语句
- 关于v4l2,一些注意de地方
- SQL SERVER2005 复制订阅功能介绍
- ODBC连MySQL实例用法
- ACCESS数据库中的表导入至oracle数据库中的方法