INT_PTR DialogBox(HINSTANCE hInstance,
LPCTSTR lpTemplate,
HWND hWndParent,
DLGPROC lpDialogFunc
);
如何将lpTemplate这个参数传入lpDialogFunc回调函数中去呢?不使用全局变量
LPCTSTR lpTemplate,
HWND hWndParent,
DLGPROC lpDialogFunc
);
如何将lpTemplate这个参数传入lpDialogFunc回调函数中去呢?不使用全局变量
解决方案 »
- 64位Vista或Win7,打开UAC时,IE9(32位)上的BHO读文件错误
- VC与MATLAB问题(在线等)
- 关于Crypto++5.5.2在自己的DLL中连接失败的问题
- 使用内存dc时,必须要把一个HBITMAP选入其中么?否则dc所对应的像素数据保存在哪里?
- 应用程序关闭之后为什么任务管理其中还能看到(进程没有关系?)
- 关于CSocket类的create失败的问题,请大家帮忙看看。
- 怎么判断系统已经注册了这个热键
- 请问vc++设置绘图背景颜色应怎样,AutoCAD中画圆时有一条从圆心到圆周的橡皮条线,画圆的过程中可以看到,但画完圆就没有了,这一功能在v
- 在ATL COM中加载位图资源问题。(急,急,急。。。。。。。。)
- windows sdk问题
- HitTest函数不管用
- 我想让INNO SETUP自动释放文件,怎么写?
一般的用法是使用资源编辑器编辑一个窗口。
然后在调用DialogBox的Cpp文件中,添加“resource.h”头文件,然后lpTemplate参数使用MAKEINTRESOURCE(IDD_DIALOG/*这个是资源的ID*/)。
DialogBoxParam可以传一个自定义参数
[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 its low-order word must contain the identifier. You can use the MAKEINTRESOURCE macro to create this value.
MAKEINTRESOURCE(IDD_DIALOG1)就可以了,不看MSDN吗?
因为有好几个Dialog都是调用同一个lpDialogFunc,
所以我才想再lpDialogFunc内部进行判断是哪个ID的Dialog
这个传入的值只有在WM_INITDIALOG消息中才可用吗?