CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VC/MFC >  界面

没有对话框资源模板,怎样用CreateDialogIndirect()创建模态对话框??

楼主guoj1997(苗人头领)2005-02-22 10:15:16 在 VC/MFC / 界面 提问

CreateDialogIndirect()总是返回"找不到映象文件中指定的资源类型"的错误。 问题点数:30、回复次数:4Top

1 楼Mackz(在相互)回复于 2005-02-22 11:19:46 得分 10

巧妇难为无米之炊。Top

2 楼jszj(老板说mis部不是赚钱的部门...)回复于 2005-03-02 17:18:20 得分 10

第二个参数该怎么写?  
  我有对话框的ID为IDD_DLG_ONETop

3 楼vcleaner(我没当大哥很久了.......)回复于 2005-03-02 17:23:54 得分 10

巧妇难为无米之炊!  
  =================  
  同意!Top

4 楼guoj1997(苗人头领)回复于 2005-03-04 12:48:45 得分 0

谢谢大家关注,该问题俺已经搞定,DLGTEMPLATE结构后面还有很多相关结构的。  
  后面还有跟具体的DLGITEMTEMPLATE结构。  
  如果想创建modal对话框,在CDialog::DoModal()前使用CDialog::InitModalIndirect()就ok了。  
   
  下面是一个结构例子:  
                    //   1.     DLGTEMPLATE   structure  
  //   2.         0x0000   (Word)   indicating   the   dialog   has   no   menu  
  //   3.         0x0000   (Word)   Let   windows   assign   default   class   to   the   dialog  
  //   4.         (Caption)     Null   terminated   unicode   string  
  //   5.         0x000B     (size   of   the   font   to   be   used)  
  //   6.         "Arial"     (name   of   the   typeface   to   be   used)  
  //   7.     DLGITEMTEMPLATE   structure   for   the   button     (HAS   TO   BE   DWORD   ALIGNED)  
  //   8.         0x0080     to   indicate   the   control   is   a   button  
  //   9.         (Title).   Unicode   null   terminated   string   with   the   caption  
  //   10.         0x0000       0   extra   bytes   of   data   for   this   control  
  //   11.     DLGITEMTEMPLATE   structure   for   the   Static   Text     (HAS   TO   BE   DWORD   ALIGNED)  
  //   12.         0x0081   to   indicate   the   control   is   static   text  
  //   13.       (Title).   Unicode   null   terminated   string   with   the   text  
  //   14           0x0000.     0   extra   bytes   of   data   for   this   control  
  //   15.   DLGITEMTEMPLATE   structure   for   the   Edit   Control   (HAS   TO   BE   DWORD   ALIGNED)  
  //   16.       0x0082   to   indicate   an   Edit   control  
  //   17.       (Text)   -   Null   terminated   unicode   string   to   appear   in   the   edit   control  
  //   18.       0x0000.   0   extra   bytes   of   data   for   this   controlTop

相关问题

  • 无模态对话框
  • 模态对话框问题
  • 调用模态对话框的问题
  • 非模态对话框的问题
  • 如何设置模态对话框
  • 有关模态对话框的问题!
  • 模态对话框中的session
  • 如何创建非模态对话框?
  • 模态对话框的问题
  • 模态对话框小问题

关键词

  • 结构
  • unicode
  • null
  • 对话框
  • dlgitemtemplate
  • structure
  • indicate
  • control
  • null terminated
  • has to be dword aligned

得分解答快速导航

  • 帖主:guoj1997
  • Mackz
  • jszj
  • vcleaner

相关链接

  • Visual C++类图书
  • Visual C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo