我在通用控件里设置了一个botton,消息处理函数:
pic *pic=new pic(this);
pic->ShowWindow(SW_SHOW);
pic->UpdateData(0);
但是编译的时候报错'IDD_pic' : undeclared identifier
请问是哪儿出了问题啊?我这个问题出现好几次了。

解决方案 »

  1.   

    pic *picture=new pic;
    picture->Create(IDD_pic,NULL);
    picture->ShowWindow(SW_SHOW);
    picture->UpdateData(0);
    刚才少了一句,请问是什么原因报错啊?我设置的对话框的id就是IDD_pic啊。
    我用模式对话框就可以掉出来。
      

  2.   

    Is pic derived from CAxDialogImpl???
    call AtlAxCreateDialog/AtlAxDialogBox
      

  3.   

    picture->Create(MAKEINTRESOURCE(IDD_pic),NULL);
      

  4.   

    还是'IDD_pic' : undeclared identifier
    不明白了。
      

  5.   

    #include "resource.h"
    Can you find IID_pic in resource.h??
      

  6.   

    少了#include "resource.h"这句…………
    现在好了,便宜出来是dll,请问怎么样才能编成ocx啊?
      

  7.   

    An OCX is in reality nothing more than a DLL. The extension OCX was carried over from the early days of control development. You have the option of changing the extension from DLL to OCX.Change it in project setting or simply rename it
      

  8.   

    以下四我程序中的代码,可以正常运行,实现显示缺省打印预览窗口。www.gridppreport.com
    CPrintPreviewDlg *PrintPreviewDlg = new CPrintPreviewDlg();
    PrintPreviewDlg->m_pReport = this;
    PrintPreviewDlg->m_IsModal = ShowModal;
    PrintPreviewDlg->m_GenerateStyle = GenerateStyle;
    if (PrintPreviewDlg->m_IsModal)
    {
    PrintPreviewDlg->DoModal();
    }
    else
    {
    PrintPreviewDlg->Create(::GetActiveWindow());
    PrintPreviewDlg->ShowWindow(SW_SHOW);
    }
      

  9.   

    "但是编译的时候报错'IDD_pic' : undeclared identifier"
    是不是没有 include "Resource.h"
      

  10.   

    CPrintPreviewDlg是继承的哪个类啊?
      

  11.   

    以下四我程序中的代码,可以正常运行,实现显示缺省打印预览窗口。www.gridppreport.com
    这个我看了,也是在另一个页面显示的,如果想在点击这个控件就立刻出现一个对话框呢?不是掉用另一个网页来显示?