CreateDialogIndirect()触发单选按钮单击功能..... [英] CreateDialogIndirect() fires Radio button click function .....

查看:66
本文介绍了CreateDialogIndirect()触发单选按钮单击功能.....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CreateDialogIndirect()触发我的单选按钮单击功能,没有点击收音机

按钮。我正在使用VC ++ 2003.NET。我相信这还是另一个微软的错误。检查了对话框资源和内存 - 两者都显示为有序的
。任何人都可以评论这个吗?位于dlgcore.cpp中的CreateDialogIndirect()

是否会触发按钮单击例程??

解决方案

"约翰加布里埃尔 <乔********* @ discussions.microsoft.com>在消息中写道

新闻:CC ********************************** @ microsof t.com ...

CreateDialogIndirect()在没有单击
收音机
按钮的情况下触发我的单选按钮单击功能。我正在使用VC ++ 2003.NET。我相信这是另一个微软的错误。




嗯。通常,o / s中的错误会影响成千上万的开发人员/用户。并且当他们这么做时,通常会有一篇知识库文章或其他讨论,或者通过Google搜索可以检索到的b $ b。我只是看了一眼,发现

没什么。


我不是说没有一个(我没有足够的信息来制作

断言)但我很怀疑。如果你可以将这个问题简化为一个小的例子,并在这里发布,有人可能会给你更好的建议。


问候,



你错误地认为你的方式。我已经在微软产品中发现了数百个错误,我不太确定它们会影响成千上万的开发者。


让我们看看我是否可以澄清这一点:


" William DePalo [MVP VC ++]"写道:

" John Gabriel" <乔********* @ discussions.microsoft.com>在消息中写道
新闻:CC ********************************** @ microsof t.com。 ..

CreateDialogIndirect()在没有单击
收音机按钮的情况下触发我的单选按钮单击功能。我正在使用VC ++ 2003.NET。我相信这是另一个微软的错误。



嗯。通常,o / s中的错误会影响成千上万的开发人员/用户。并且当它们这样做时,通常会有一篇知识库文章或其他讨论,它可以通过Google搜索轻松检索。我只是看了之后发现什么都没有。

我不是说没有人(我没有足够的信息来做出那个断言)但是我很怀疑。如果你可以将这个问题简化为一个小例子并在这里发布,有人可能会给你更好的建议。

问候,



我对调试Microsoft产品没兴趣。事实上我已经找到了一个解决方法,但我会向你证明这是一个错误。我是专家

汇编语言程序员。


让我们看看我是否可以更多地澄清这一点:


CreateDialogIndirect实际上是一个包含

CreateDialogIndirectParam()函数的宏。


当我设置断点并反汇编代码时,以下是我得到的



hWnd = :: CreateDialogIndirect(hInst,lpDialogTemplate,

pParentWnd-> GetSafeHwnd() ,afxDlgProc);

7C2364D0 mov ecx,dword ptr [pParentWnd]

7C2364D3调用CWnd :: GetSafeHwnd(7C28E080h)

7C2364D8 mov dword ptr [ebp-94h],eax

7C2364DE推0

7C2364E0推偏移AfxDlgProc(7C235B30h)

7C2364E5 mov edx,dword ptr [ebp- 94h]

7C2364EB推edx

7C2364EC mov eax,dword ptr [lpDialogTemplate]

7C2364EF push eax

7C2364F0 mov ecx,dword p tr [hInst]

7C2364F3 push ecx

7C2364F4呼叫dword ptr [__imp__CreateDialogIndirectParamA @ 20

(7C141A98h)]

7C2364FA mov dword ptr [hWnd],eax


注意调用CreateDialofIndirectParam - 我的单选按钮点击

函数从此调用中被触发。在这里,我的

朋友无所畏惧。此功能不应该触发任何按钮点击功能。

顺便提一下,它只触发一个单选按钮点击功能,并且该对话框上还有




John

" William DePalo [MVP VC ++]"写道:

" John Gabriel" <乔********* @ discussions.microsoft.com>在消息中写道
新闻:CC ********************************** @ microsof t.com。 ..

CreateDialogIndirect()在没有单击
收音机按钮的情况下触发我的单选按钮单击功能。我正在使用VC ++ 2003.NET。我相信这是另一个微软的错误。



嗯。通常,o / s中的错误会影响成千上万的开发人员/用户。并且当它们这样做时,通常会有一篇知识库文章或其他讨论,它可以通过Google搜索轻松检索。我只是看了之后发现什么都没有。

我不是说没有人(我没有足够的信息来做出那个断言)但是我很怀疑。如果你可以将这个问题简化为一个小例子并在这里发布,有人可能会给你更好的建议。

问候,



CreateDialogIndirect() fires my Radio button click function without the radio
button having being clicked. I am using VC++ 2003.NET. I believe this is yet
another Microsoft bug. Have checked dialog resources and memory - both appear
to be in order. Can anyone comment on this? Should CreateDialogIndirect()
which is located in dlgcore.cpp ever fire a button click routine??

解决方案

"John Gabriel" <Jo*********@discussions.microsoft.com> wrote in message
news:CC**********************************@microsof t.com...

CreateDialogIndirect() fires my Radio button click function without the
radio
button having being clicked. I am using VC++ 2003.NET. I believe this is
yet
another Microsoft bug.



Hmm. Usually bugs in the o/s affect thousands of developers / users. And
when they do, there is usually a knowledge base article or other discussion
of it easiliy retrievable with a Google search. I just looked and found
nothing.

I''m not saying there isn''t one (I don''t have enough information to make that
assertion) but I''m skeptical. If you can whittle the problem down to a small
example and post it here, someone may have better advice for you.

Regards,
Will


You are mistaken to think the way you do. I have found hundreds of bugs in
Microsoft products and I am not so sure these affect thousands of developers.

Let''s see if I can clarify this a bit more:

"William DePalo [MVP VC++]" wrote:

"John Gabriel" <Jo*********@discussions.microsoft.com> wrote in message
news:CC**********************************@microsof t.com...

CreateDialogIndirect() fires my Radio button click function without the
radio
button having being clicked. I am using VC++ 2003.NET. I believe this is
yet
another Microsoft bug.



Hmm. Usually bugs in the o/s affect thousands of developers / users. And
when they do, there is usually a knowledge base article or other discussion
of it easiliy retrievable with a Google search. I just looked and found
nothing.

I''m not saying there isn''t one (I don''t have enough information to make that
assertion) but I''m skeptical. If you can whittle the problem down to a small
example and post it here, someone may have better advice for you.

Regards,
Will



I have no interest in debugging Microsoft products. In fact I have already
found a workaround but I will prove to you that this is a bug. I am an expert
assembly language programmer.

Let''s see if I can clarify this a bit more:

CreateDialogIndirect is really a macro that wraps the
CreateDialogIndirectParam() function.

When I set a break point and disassembled the code, the following is what I
got:

hWnd = ::CreateDialogIndirect(hInst, lpDialogTemplate,
pParentWnd->GetSafeHwnd(), AfxDlgProc);
7C2364D0 mov ecx,dword ptr [pParentWnd]
7C2364D3 call CWnd::GetSafeHwnd (7C28E080h)
7C2364D8 mov dword ptr [ebp-94h],eax
7C2364DE push 0
7C2364E0 push offset AfxDlgProc (7C235B30h)
7C2364E5 mov edx,dword ptr [ebp-94h]
7C2364EB push edx
7C2364EC mov eax,dword ptr [lpDialogTemplate]
7C2364EF push eax
7C2364F0 mov ecx,dword ptr [hInst]
7C2364F3 push ecx
7C2364F4 call dword ptr [__imp__CreateDialogIndirectParamA@20
(7C141A98h)]
7C2364FA mov dword ptr [hWnd],eax

Notice the call to CreateDialofIndirectParam - my radio button click
function is fired from this call. There is nothing to wonder about here my
friend. This function should not be firing any button click functions.
Incidentally, it only fires one radio button click function and there are
more on that dialog.

John
"William DePalo [MVP VC++]" wrote:

"John Gabriel" <Jo*********@discussions.microsoft.com> wrote in message
news:CC**********************************@microsof t.com...

CreateDialogIndirect() fires my Radio button click function without the
radio
button having being clicked. I am using VC++ 2003.NET. I believe this is
yet
another Microsoft bug.



Hmm. Usually bugs in the o/s affect thousands of developers / users. And
when they do, there is usually a knowledge base article or other discussion
of it easiliy retrievable with a Google search. I just looked and found
nothing.

I''m not saying there isn''t one (I don''t have enough information to make that
assertion) but I''m skeptical. If you can whittle the problem down to a small
example and post it here, someone may have better advice for you.

Regards,
Will



这篇关于CreateDialogIndirect()触发单选按钮单击功能.....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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