你可以不让它手工注册,我的意思是:把要注册的控件放在一组(File Group),选择自动注册。另外,如果手工注册,使用LaunchAppAndWait(),有一个参数是是否WAIT(具体记不大清了),选NOWAIT就会在后台执行,这样就看不到对话框了
解决方案 »
- 《WINDOWS核心编程》的源程序编译不了是什么问题?
- 求助:消息传递能以有层次的结构的数据传递,如结构体?
- 有没有办法在一台电脑中虚拟n个ip访问互联网?请大家指点。谢谢
- 对话框问题
- 使用界面库Xtreme Toolkit里面的outputbar 怎么响应鼠标双击消息? 我使用消息映射好像不行
- ★大家看看我设计的一个秒表(思路)
- 好东西一起分享,不要错过阿!
- 怎样将gb2312转换成unicode
- 我问一下:vc映射的函数能修改吗?
- VC中如何在工具条是添加文本框等控件?
- 为什么有的mp3用media player7/8播没声音,用winamp播就有?
- CFormView中如何实现CDialog::NextDlgCtrl()的功能
if(hLib==NULL) //加载失败
HRESULT WINAPI (*fn)();
fn = GetProcAddress(hLib,"DllRegisterServer");
if(fn!=NULL)
{
if(fn()==S_OK)//注册成功
else//注册失败
}
else//不支持注册
FreeLibrary(hLib);
1)选择自动注册: 弹出没商量;
2)手工注册:LaunchAppAndWait(TARGETDIR^"DivX4.exe", "", WAIT/* or NOWAIT */); 弹出没商量问题是此控件内置了一个MESSAGEBOX,一注册(Regsvr32 **.**)就弹出,所以 /s 不管用
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.
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 控件,若想四司,发给你
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.
(FARPROC&) pfnRegServer = ::GetProcAddress(hOleServerInst, _T("DllRegisterServer"));
帮帮忙吧,以拉登的名义,我一定会感谢你的
除了写注册表外,还干了什么,仅写注册表,是否可完成注册 ?
If it's OK, 你鞠躬置伟 !!
svTemp = "\""+WINSYSDIR + "sysnote.dll\"";//控件路径
if (LaunchApp("regsvr32.exe /s ",svTemp) < 0) then
MessageBox("控件注册失败,请重新安装", SEVERE);
endif;
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三个参素如何设子 ?
从头到尾看看,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三个参素如何设子 ?
我给对话框的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 );
}
}
}
FORWARD_WM_COMMAND(hwnd, IDOK, ::GetDlgItem(hwnd, IDOK), BN_CLICKED, ::PostMessage);真诚感谢大家,元旦快乐 ^^
叫版主帮你破吧,
其实就是一个对话框而已,用SICE debug一下,很容易的。