void CVCCodeDlg::OnButton2()
{
// TODO: Add your control notification handler code here
CRegKey reg;
reg.Open (HKEY_CURRENT_USER,"SOFTWARE\\WEBZEN\\MU\\CONFIG");
//写值
reg.SetValue(1,"SoundOnOff"); //DWORD 修改键值
AfxMessageBox("OK");
}向SoundOnOff写其他可以..我想写0怎么就有下面的错误提示:C:\WINDOWS\Desktop\VCCode\VCCode\VCCodeDlg.cpp(200) : error C2668: 'SetValue' : ambiguous call to overloaded function
Error executing cl.exe.帮帮菜鸟吧.....谢谢
{
// TODO: Add your control notification handler code here
CRegKey reg;
reg.Open (HKEY_CURRENT_USER,"SOFTWARE\\WEBZEN\\MU\\CONFIG");
//写值
reg.SetValue(1,"SoundOnOff"); //DWORD 修改键值
AfxMessageBox("OK");
}向SoundOnOff写其他可以..我想写0怎么就有下面的错误提示:C:\WINDOWS\Desktop\VCCode\VCCode\VCCodeDlg.cpp(200) : error C2668: 'SetValue' : ambiguous call to overloaded function
Error executing cl.exe.帮帮菜鸟吧.....谢谢
解决方案 »
- 有点难度的问题。。VC程序调用QT程序 传参
- 如何解决fatal error C1004: unexpected end of file found error C2146: syntax error : missing ';' before identifier 'WndProc'问
- vc 连接accsss数据库
- VC好帅啊!!!!!!!!!我感动了!!!!!
- 在线等OK了马上给分,用VC写了个OCX怎么在网页里去注册它? 谢谢
- 如何知道我的vc6是否是sp5的,在哪里下sp5呢?
- 极小化OpenGL是什么意思
- 请帮帮忙
- 请问如何创建这么奇怪的窗体?
- 请问VC6.0,怎么在一个菜单下,创建子菜单啊?
- 一个简单问题
- 指针序列化问题
LONG SetValue(
LPCTSTR pszValueName,
DWORD dwType,
const void* pValue,
ULONG nBytes
)
reg.SetValue(DWORD(0),"Mail Column"); //DWORD 修改键值
就没有问题了。
因为该函数有3个重载(看看MSDN),其中前两个的第一个参数一个是DWORD型,一个是LPCTSTR型。你把0传进去,0既可以是DWORD,又可以是LPCTSTR(此时就是空指针),编译器就傻了,不知道要调用哪一个了,呵呵。