关于win7中的CToolBar :: AddButton [英] about CToolBar::AddButton in the win7

查看:77
本文介绍了关于win7中的CToolBar :: AddButton的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有vc6的ocx,并且在Windows2003和winXp中运行此ocx时没有错误,现在我想在win7中运行,并且在TSTCON32.EXE中测试此ocx时发现了一些错误,并且我发现了错误所在我跑到AddButtons.错误dlg显示为"TSTCON32.EXE(kernel32.dll)0xC0000005访问冲突中的Unhandle异常".有人可以帮助我吗?非常感谢.

和flowwing是代码:

i have a ocx with vc6,and no error when run this ocx in windows2003 and winXp ,now i want to run in win7,and i find some wrong when test this ocx in TSTCON32.EXE , and i found the error where i run to AddButtons. the error dlg is shown with the words like "Unhandle exception in TSTCON32.EXE(kernel32.dll) 0xC0000005 Access Violation". someone can help me? many thanks.

and the flowwing is the code :

CToolBar m_ToolBar;
CToolBarCtrl  objToolBarCtrl = m_ToolBar.GetToolBarCtrl();
TBBUTTON objButton;
 
objButton.idCommand = IDB_ANSWER;
objButton.iBitmap = 0;
objButton.fsStyle = TBSTYLE_BUTTON;
objButton.fsState = TBSTATE_ENABLED;
 
objToolBarCtrl.AddButtons(1, &objButton);

推荐答案

请在此处查看:
http://forums.iis.net/t/1150828.aspx [ http://www.daniweb.com/hardware-and-software/microsoft-windows/threads/39732/unhandled-exception-in-iexplorer.exe-shdocvw.dll-0xc0000005-access-violation [ http://www.serkey.com/unhandled-exception-in-ole32- dll-bcpn8s.html#bb2knf [ ^ ]
希望对您有所帮助
Please look here:
http://forums.iis.net/t/1150828.aspx[^]
http://www.daniweb.com/hardware-and-software/microsoft-windows/threads/39732/unhandled-exception-in-iexplorer.exe-shdocvw.dll-0xc0000005-access-violation[^]
http://www.serkey.com/unhandled-exception-in-ole32-dll-bcpn8s.html#bb2knf[^]
I hope it will help


ocx->在Internet Explorer中运行?

因此,请检查运行此代码的进程的特权. (并尝试使用更高的权限)

我想问题是,某些安全问题,某些SendMessage无权发送消息.

更改流程权限或考虑完成用例"的其他方法.
ocx -> runs in Internet Explorer?

So check the privileges of the process which run this code. (and try with higher rights)

I guess the problem is, that some SendMessage has no rights to send the message for some security issues.

Alter the process rights or think about other ways to accomplish your "use case".


这篇关于关于win7中的CToolBar :: AddButton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆