你可以不让它手工注册,我的意思是:把要注册的控件放在一组(File Group),选择自动注册。另外,如果手工注册,使用LaunchAppAndWait(),有一个参数是是否WAIT(具体记不大清了),选NOWAIT就会在后台执行,这样就看不到对话框了

解决方案 »

  1.   

    HMODLUE hLib = LoadLibrary(pOcxFileName)
    if(hLib==NULL) //加载失败
    HRESULT WINAPI (*fn)();
    fn = GetProcAddress(hLib,"DllRegisterServer");
    if(fn!=NULL)
    {
     if(fn()==S_OK)//注册成功
     else//注册失败
    }
    else//不支持注册
    FreeLibrary(hLib);
      

  2.   

    两位,你们说的我都试过了,
    1)选择自动注册: 弹出没商量;
    2)手工注册:LaunchAppAndWait(TARGETDIR^"DivX4.exe", "", WAIT/* or NOWAIT */); 弹出没商量问题是此控件内置了一个MESSAGEBOX,一注册(Regsvr32 **.**)就弹出,所以 /s 不管用
      

  3.   

    HRESULT WINAPI (*fn) ();无法通过编译F:\Vc_11_9\TextView\TextViewDlg.cpp(66) : error C2059: syntax error : '('
    F:\Vc_11_9\TextView\TextViewDlg.cpp(67) : error C2065: 'fn' : undeclared identifier
    F:\Vc_11_9\TextView\TextViewDlg.cpp(67) : error C2440: '=' : cannot convert from 'int (__stdcall *)(void)' to 'int'
            This conversion requires a reinterpret_cast, a C-style cast or function-style cast
    Error executing cl.exe.
      

  4.   

    没有源码吗?有的话,把DllRegisterServer里的对话框去掉即可
      

  5.   

    The right code likefollowing, but 弹出没商量 HMODULE hLib = LoadLibrary("F:\\divxdec.ax");
    if(hLib==NULL) //加载失败
    AfxMessageBox("no lib", MB_OK, 0);// HRESULT WINAPI (*fn) ();
    FARPROC fn = GetProcAddress(hLib,"DllRegisterServer");
    if(fn!=NULL) {
    if(fn()==S_OK) //注册成功
    ;
    else //注册失败
    ;
    }
    else //不支持注册
    AfxMessageBox("no registry", MB_OK, 0); FreeLibrary(hLib); 告诉我你们的邮箱,Fuck the 控件,若想四司,发给你
      

  6.   

    http://codeguru.earthweb.com/activex/regserver.shtml
    Programmatically registering and unregistering COM servers
    In certain situations, there may be a need to programmatically register or unregister a COM server given just the name of the module that actually implements it. The specified server could be an InProcess COM server or an OutOfProcess COM server. As we all know, inprocess COM servers are registered by loading the DLL module and invoking the exported function DllRegisterServer(). The unregistration operation is performed by invoking DllUnregisterServer() instead. 
      

  7.   

    compilbe success, but 弹出没商量RegisterOleServer(CString("F:\\divxdec.ax"), TRUE) ;
      

  8.   

    不能引用 或 在引用前重载 the function
    (FARPROC&) pfnRegServer = ::GetProcAddress(hOleServerInst, _T("DllRegisterServer"));
      

  9.   

    Hi man,
    帮帮忙吧,以拉登的名义,我一定会感谢你的
      

  10.   

    你查查installshield的帮助,好像有一个方法,就是忽略这些弹出框的,我记不大清了。
      

  11.   

    呵呵,我觉得那个控件好象把这个对话框写在了对注册的响应函数DllRegisterServer(好象是这个)中了。如果是这样的话,调用任何注册控件的函数都会出对话框的。要想不出对话框,可以自己写注册表啊!
      

  12.   

    ? In DllRegisterServer()
    除了写注册表外,还干了什么,仅写注册表,是否可完成注册 ?
      

  13.   

    Waited an waited, then he ...
      

  14.   

    http://www.csdn.net/Expert/topic/440/440602.shtm
      

  15.   

    能不能写一个后台程序(shutdown)用AfxFindWindow找到弹出的对话框,然后SendMessage关闭这个窗口。然后用Installshield在后台执行这个程序,使之自动关闭不知道行不行?
      

  16.   

    Good idea, I try,
    If it's OK, 你鞠躬置伟 !!
      

  17.   

    脚本解决如下:
    svTemp = "\""+WINSYSDIR + "sysnote.dll\"";//控件路径
    if (LaunchApp("regsvr32.exe /s ",svTemp) < 0) then
          MessageBox("控件注册失败,请重新安装", SEVERE);
    endif;
      

  18.   

    Because : 这个对话框写在了对注册的响应函数DllRegisterServer(好象是这个)中了
    So:
    Never use the Regsver32.exe 问一下:
    a AfxMessageBox((LPCTSTR) result, MB_OKCANCEL, 0);
    想Send a message to this MessageDialog do like push the the OK button
    Using the SendMessage(hwnd, message, wParam, lParam);
    hwnd: 已知;
    message: WM_COMMAND
    wParam: 00000006
    lParam: 000000E5wNotifyCode      BN_CLICKED
    WID              DIYES
    hwndCtl          000000E5message, wParam, lParam三个参素如何设子 ?
     
      

  19.   

    to : thinp(包含类)
    从头到尾看看,Never so easy大家看看下面:
    AfxMessageBox((LPCTSTR) "result", MB_OKCANCEL, 0);
    想Send a message to this MessageDialog do like push the the OK button
    Using the SendMessage(hwnd, message, wParam, lParam);
    hwnd: 已知;
    message: WM_COMMAND
    wParam: 00000006
    lParam: 000000E5wNotifyCode      BN_CLICKED
    WID              DIYES
    hwndCtl          000000E5message, wParam, lParam三个参素如何设子 ?
      

  20.   

    Push & push & push again
      

  21.   

       我想到个非常老土的办法,听说有人说不管是土办法、洋办法能用的办法就是好办法,所以就特出来了:
       我给对话框的Cancel发WM_LBUTTONDOWN,WM_LBUTTONUP对话框真的关了耶。void CTest::OnTest() 
    {
      if( ::IsWindow( this->m_hWndFind ) )
      {
        HWND hWnd = ::GetDlgItem( m_hWndFind , IDCANCEL );
        if( ::IsWindow( hWnd ) )
        {
          ::PostMessage( hWnd , WM_LBUTTONDOWN , 0 , 0 );
          ::PostMessage( hWnd , WM_LBUTTONUP , 0 , 0 );
        }
      }
    }
      

  22.   

    搞定了,
    FORWARD_WM_COMMAND(hwnd, IDOK, ::GetDlgItem(hwnd, IDOK), BN_CLICKED, ::PostMessage);真诚感谢大家,元旦快乐 ^^
      

  23.   

    控件注册仅仅是设置注册表,安装以后再“抓”下来自己设置也是可以的,记住不要使用绝对路径!(比如用RegMonitor来监视注册过程的注册表操作。)
      

  24.   

    LaunchApp(WINSYSDIR^"regsvr32.exe /s", WINSYSDIR^"control.ax")control.ax 确实在 ..//WINDOWS//SYSTEM 目录下哪里有错 ???
      

  25.   

    CRACK掉吧 , www.crackbest.com
    叫版主帮你破吧,
    其实就是一个对话框而已,用SICE debug一下,很容易的。
      

  26.   

    注册的时候能够谈出对话框,说明你的控件的路径是正确的,那么只需要用Regsvr32.exe注册控件的时候加上一个参数/s就可以了。
      

  27.   

    LaunchApp(WINSYSDIR^"regsvr32.exe /s", WINSYSDIR^"control.ax") 返回 < 0control.ax 确实在 ..//WINDOWS//SYSTEM 目录下哪里有错 ???
      

  28.   

    你只要把他放在file group 中的share dll,同时不要设未self_regist就可以了