当前位置:首页
开发技术指南» 文章正文
    引言:

 ·framework本地化工具(可能)    »显示摘要«
    摘要: http://www.thinstall.com/help/index.html?microsoft_netframeworklinki.htm ......
    摘要: create procedure hztj @dt1 datetime,@dt2 datetime,@dt3 datetime as declare @d_order_pbsl numeric(10,2),@d_order_dhsl numeric(10,2),@m_order_pbsl numeric(10,2),@m_order_dhsl numeric(10,2) set @d_or......


从CFileDialog派生自定义Open对话框的问题

我要自定义一个open对话框,除了common   filedialog,添加了一些control,同时使用了hook,在hook   proc中有   WM_INITDIALOG的定义,那么请问添加的control在什么地方定义,比如说我要  
   
  BOOL   fdex_mfc_dlg::OnInitDialog()  
  {  
  CFileDialog::OnInitDialog();  
   
  CListBox*   pLB   =   (CListBox*)GetDlgItem(IDC_ENV);  
  pLB->InsertString(-1,   "Current   Project");  
  pLB->InsertString(-1,   "Current   scenes");  
  pLB->InsertString(-1,   "Projects");  
  pLB->InsertString(-1,   "Default");  
  pLB->InsertString(-1,   "Home");  
  pLB->SetIndex(0);  
   
  return   TRUE;     //   return   TRUE   unless   you   set   the   focus   to   a   control  
  //   异常:   OCX   属性页应返回   FALSE  
  }好像不起作用了!主要是hook   proc是全局函数,该如何使用使用mfc类

NO.1   作者: jiangsheng

文件对话框上的控件在收到WM_INITDIALOG甚至是CDN_INITDONE的时候都还不存在。最简单的解决方法是使用自定义消息  
  BOOL   CMyOpenDlg::OnInitDialog()  
  {  
        CFileDialog::OnInitDialog();  
        PostMessage(MYWM_POSTINIT,0,0);  
        return   TRUE;  
  }  
  然后在MYWM_POSTINIT的处理函数中操作文件对话框上的控件。因为使用了PostMessage,所以这个消息在之前消息队列中所有消息得到处理之后才会被处理,这时候文件对话框已经初始化完毕了。

NO.2   作者: Stefine

仿COMMANDIALOG的VC源码编写     添加control


 ·eclipse交流    »显示摘要«
    摘要: eclipse有没有什么好的书籍???? 请大家介绍一下!!!!!谢谢!~!~ ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE