CreateDialogInd irect() 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 CreateDialogInd irect()
which is located in dlgcore.cpp ever fire a button click routine?? 24 4520
"John Gabriel" <Jo*********@di scussions.micro soft.com> wrote in message
news:CC******** *************** ***********@mic rosoft.com... CreateDialogInd irect() 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*********@di scussions.micro soft.com> wrote in message news:CC******** *************** ***********@mic rosoft.com... CreateDialogInd irect() 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:
CreateDialogInd irect is really a macro that wraps the
CreateDialogInd irectParam() function.
When I set a break point and disassembled the code, the following is what I
got:
hWnd = ::CreateDialogI ndirect(hInst, lpDialogTemplat e,
pParentWnd->GetSafeHwnd( ), AfxDlgProc);
7C2364D0 mov ecx,dword ptr [pParentWnd]
7C2364D3 call CWnd::GetSafeHw nd (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 [lpDialogTemplat e]
7C2364EF push eax
7C2364F0 mov ecx,dword ptr [hInst]
7C2364F3 push ecx
7C2364F4 call dword ptr [__imp__CreateDi alogIndirectPar amA@20
(7C141A98h)]
7C2364FA mov dword ptr [hWnd],eax
Notice the call to CreateDialofInd irectParam - 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*********@di scussions.micro soft.com> wrote in message news:CC******** *************** ***********@mic rosoft.com... CreateDialogInd irect() 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
Information for you to try and replicate the problem:
I am using MDI to create a view with a tab control. One of the tabs is the
home of several radio check buttons. All the radio check buttons have
click-event routines.
The function I referred to below only fires the first in the series of these
dialog radio buttons.
"John Gabriel" wrote: 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:
CreateDialogInd irect is really a macro that wraps the CreateDialogInd irectParam() function.
When I set a break point and disassembled the code, the following is what I got:
hWnd = ::CreateDialogI ndirect(hInst, lpDialogTemplat e, pParentWnd->GetSafeHwnd( ), AfxDlgProc); 7C2364D0 mov ecx,dword ptr [pParentWnd] 7C2364D3 call CWnd::GetSafeHw nd (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 [lpDialogTemplat e] 7C2364EF push eax 7C2364F0 mov ecx,dword ptr [hInst] 7C2364F3 push ecx 7C2364F4 call dword ptr [__imp__CreateDi alogIndirectPar amA@20 (7C141A98h)] 7C2364FA mov dword ptr [hWnd],eax
Notice the call to CreateDialofInd irectParam - 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*********@di scussions.micro soft.com> wrote in message news:CC******** *************** ***********@mic rosoft.com... CreateDialogInd irect() 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
"John Gabriel" <Jo*********@di scussions.micro soft.com> wrote in message
news:F5******** *************** ***********@mic rosoft.com... I have no interest in debugging Microsoft products.
OK.
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.
An assertion is not proof.
Let's see if I can clarify this a bit more:
CreateDialogInd irect is really a macro that wraps the CreateDialogInd irectParam() function.
Correct.
When I set a break point and disassembled the code, the following is what I got:
hWnd = ::CreateDialogI ndirect(hInst, lpDialogTemplat e, pParentWnd->GetSafeHwnd( ), AfxDlgProc); 7C2364D0 mov ecx,dword ptr [pParentWnd] 7C2364D3 call CWnd::GetSafeHw nd (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 [lpDialogTemplat e] 7C2364EF push eax 7C2364F0 mov ecx,dword ptr [hInst] 7C2364F3 push ecx 7C2364F4 call dword ptr [__imp__CreateDi alogIndirectPar amA@20 (7C141A98h)] 7C2364FA mov dword ptr [hWnd],eax
Notice the call to CreateDialofInd irectParam - my radio button click function is fired from this call.
As I said, an assertion is not proof. There may be a bug there. But unless
you can say do X and Y results, and until that experience is replicated by
others, what we have here is just a little annecdote.
I just checked an application of mine (~50K lines of Win32 C code) in which
there is a single CreateDialogInd irect() call. I ran it on this XP/SP2 box.
I see no spurrious button clicks.
Look, I'm not saying there are no bugs in the platform. The knowledge base
lists quite a few. But in the ten years that I have been reading this group
and its predecessor on CIS, the overwhelming majority of new reports turn
out to be in the application code.
Regards,
Will
"John Gabriel" <Jo*********@di scussions.micro soft.com> wrote in message
news:9F******** *************** ***********@mic rosoft.com... Information for you to try and replicate the problem: ... When I set a break point and disassembled the code, the following is what I got:
hWnd = ::CreateDialogI ndirect(hInst, lpDialogTemplat e, pParentWnd->GetSafeHwnd( ), AfxDlgProc); 7C2364D0 mov ecx,dword ptr [pParentWnd] 7C2364D3 call CWnd::GetSafeHw nd (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 [lpDialogTemplat e] 7C2364EF push eax 7C2364F0 mov ecx,dword ptr [hInst] 7C2364F3 push ecx 7C2364F4 call dword ptr [__imp__CreateDi alogIndirectPar amA@20 (7C141A98h)] 7C2364FA mov dword ptr [hWnd],eax
Notice the call to CreateDialofInd irectParam - my radio button click function is fired from this call.
I forgot to ask in my last post if you know that dialog creations causes the
WM_INITDIALOG message to sent? It is possible that whatever trouble you have
emanates from the handler for that message.
Regards,
Will
My first response is always to check my code for errors. I have been a
programmer over 20 years so I don't rush to conclusions and usually I am not
wrong. This is often perceived as arrogance but it is not - only quiet
confidence.
Look, this is not an assertion as you claim. Do you agree that the
CreateDialogInd irectParm() function should not fire click events? If you
answer yes to this, then there is a bug.
As I said, this function is called for a dialog box that is attached to a
Tab Control that is attached to 1 of 3 panes in a view. On this dialog box
there are only radio check buttons and all of them have a button click
routine.
I am using XP/SP1. But this makes no difference. I traced the call in
assembly right up to the point where my click routine is called. To me this
is solid proof that the CreateDialogInd irectParm function is firing my click
routine.
John
"William DePalo [MVP VC++]" wrote: "John Gabriel" <Jo*********@di scussions.micro soft.com> wrote in message news:F5******** *************** ***********@mic rosoft.com...I have no interest in debugging Microsoft products.
OK.
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.
An assertion is not proof.
Let's see if I can clarify this a bit more:
CreateDialogInd irect is really a macro that wraps the CreateDialogInd irectParam() function.
Correct.
When I set a break point and disassembled the code, the following is what I got:
hWnd = ::CreateDialogI ndirect(hInst, lpDialogTemplat e, pParentWnd->GetSafeHwnd( ), AfxDlgProc); 7C2364D0 mov ecx,dword ptr [pParentWnd] 7C2364D3 call CWnd::GetSafeHw nd (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 [lpDialogTemplat e] 7C2364EF push eax 7C2364F0 mov ecx,dword ptr [hInst] 7C2364F3 push ecx 7C2364F4 call dword ptr [__imp__CreateDi alogIndirectPar amA@20 (7C141A98h)] 7C2364FA mov dword ptr [hWnd],eax
Notice the call to CreateDialofInd irectParam - my radio button click function is fired from this call.
As I said, an assertion is not proof. There may be a bug there. But unless you can say do X and Y results, and until that experience is replicated by others, what we have here is just a little annecdote.
I just checked an application of mine (~50K lines of Win32 C code) in which there is a single CreateDialogInd irect() call. I ran it on this XP/SP2 box. I see no spurrious button clicks.
Look, I'm not saying there are no bugs in the platform. The knowledge base lists quite a few. But in the ten years that I have been reading this group and its predecessor on CIS, the overwhelming majority of new reports turn out to be in the application code.
Regards, Will
"John Gabriel" <Jo*********@di scussions.micro soft.com> wrote in message
news:EF******** *************** ***********@mic rosoft.com... I am using XP/SP1. But this makes no difference. I traced the call in assembly right up to the point where my click routine is called. To me this is solid proof that the CreateDialogInd irectParm function is firing my click routine.
As I said, it does not prove your assertion. You say CreateDialogInd irect()
is buggy in your experience. I say it is not in mine. What does that prove?
Absolutely nothing.
Further, there are a number of things that happen as a result of the call to
CreateDialogInd irect() and indeed happen _before_ it returns. For example,
more than a couple of messages are directed at the window as a result of the
call. The application's handler for any of them, or a handler in a base
class if you are using MFC or some such could be the source of your problem.
Regards,
Will
Not sure it applies, but radio buttons are documented to fire a BN_CLICKED
notification when they get a WM_SETFOCUS.
--
Jeff Partch [VC++ MVP]
"John Gabriel" <Jo*********@di scussions.micro soft.com> wrote in message
news:EF******** *************** ***********@mic rosoft.com... My first response is always to check my code for errors. I have been a programmer over 20 years so I don't rush to conclusions and usually I am not wrong. This is often perceived as arrogance but it is not - only quiet confidence.
Look, this is not an assertion as you claim. Do you agree that the CreateDialogInd irectParm() function should not fire click events? If you answer yes to this, then there is a bug.
As I said, this function is called for a dialog box that is attached to a Tab Control that is attached to 1 of 3 panes in a view. On this dialog box there are only radio check buttons and all of them have a button click routine.
I am using XP/SP1. But this makes no difference. I traced the call in assembly right up to the point where my click routine is called. To me this is solid proof that the CreateDialogInd irectParm function is firing my click routine.
John "William DePalo [MVP VC++]" wrote:
"John Gabriel" <Jo*********@di scussions.micro soft.com> wrote in message news:F5******** *************** ***********@mic rosoft.com... >I have no interest in debugging Microsoft products.
OK.
> 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.
An assertion is not proof.
> Let's see if I can clarify this a bit more: > > CreateDialogInd irect is really a macro that wraps the > CreateDialogInd irectParam() function.
Correct.
> When I set a break point and disassembled the code, the following is > what > I > got: > > hWnd = ::CreateDialogI ndirect(hInst, lpDialogTemplat e, > pParentWnd->GetSafeHwnd( ), AfxDlgProc); > 7C2364D0 mov ecx,dword ptr [pParentWnd] > 7C2364D3 call CWnd::GetSafeHw nd (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 [lpDialogTemplat e] > 7C2364EF push eax > 7C2364F0 mov ecx,dword ptr [hInst] > 7C2364F3 push ecx > 7C2364F4 call dword ptr [__imp__CreateDi alogIndirectPar amA@20 > (7C141A98h)] > 7C2364FA mov dword ptr [hWnd],eax > > Notice the call to CreateDialofInd irectParam - my radio button click > function is fired from this call.
As I said, an assertion is not proof. There may be a bug there. But unless you can say do X and Y results, and until that experience is replicated by others, what we have here is just a little annecdote.
I just checked an application of mine (~50K lines of Win32 C code) in which there is a single CreateDialogInd irect() call. I ran it on this XP/SP2 box. I see no spurrious button clicks.
Look, I'm not saying there are no bugs in the platform. The knowledge base lists quite a few. But in the ten years that I have been reading this group and its predecessor on CIS, the overwhelming majority of new reports turn out to be in the application code.
Regards, Will This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: sman |
last post by:
Hi, I recently read this article on About.com on how to create
required fields for a form:
http://javascript.about.com/library/scripts/blformvalidate.htm
Everything works great except that there are no instructions on how to
make checkboxes and radio buttons required. I've tried adding these to
my form, but I'm having no luck. Anyone know how to add radio buttons
and checkboxes using the existing code mentioned on the url?
Thank you!
|
by: DettCom |
last post by:
Hello,
I would like to be able to display or hide fields based on whether a
specific Yes/No radio button is selected. This is in conjunction with
a posting a just made here in the same group related to checkboxes.
Thanks!!!
|
by: HD |
last post by:
Hi.
I have an asp page with radio buttons and a combobox... when the user clicks
a radio button, I want the form to submit so I can execute the ASP code in
order to change the list shown in the combobox... I have 2 radiobuttons:
<input type="radio" name="terriprod" value="E">E
<input type="radio" name="terriprod" value="D">D
I have tried adding an OnClick event to each of the radio button...
|
by: MickG |
last post by:
I am trying to change the value of the variable "hard" according to
which radio button is pressed and I am having no joy. Could anyone
help me with this, the problematic section is marked with
***********************, I've included all the code incase that isn't
where the problem is.
Any help would be hugely appreciated.
Mick
|
by: John Davis |
last post by:
I created a ASP.NET Web Form using VB.NET with a text box, 2 radio buttons.
When the user click the first radio button, the text will change to
uppercase. If the user clicks the other radio button, the text will change
to lowercase.
I added the following event, but still won't able to change the text to
uppercase.
Private Sub RadioButton1_CheckedChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles...
| |
by: Mike Salter |
last post by:
I created a page that reads a DB for questions and possible answers
(usuallyYes/No). I create a panel for each group of questions, and add a
panel for each question to the Group panel. To the Question panel I add a
label with the question text, and a radiobuttonlist with the answers. I
have an eventhandler I add to each radiobuttonlist, which is the same for
all.
The Group panels are then added to Placeholder1.Controls. I then add...
|
by: nathaniel.k.lee |
last post by:
Is it not possible, in IE, to dynamically click a radio button? I'm
grabbing some values from a database and using them to populate radio
buttons on a page. I have alternate code for Firefox browsers using the
setAttribute() function.
Everything works as planned in Firefox but in IE, the buttons won't
populate and, what's worse, I can't even click on them after everything
loads. I see the slight shadow that indicates you're clicking on a...
|
by: Saul |
last post by:
I have a set of radio buttons that are created dynamically, after
rendered I try loop thru this set by getting the length of the set, but
I keep getting an error stating the element is undefined. I am using
getElelementsByName since these are radio buttons, but it seems that
the dynamic element is not seen!!!
This is my code... please let me know if there is anything that I am
doing wrong! - thanks
----
....
|
by: namanhvu |
last post by:
Hi everyone,
I'm trying to create a form where the radio button is automatically
selected when the input text field beside it is clicked. I know I need
to use "onClick" somewhere but I don't know how.
With links I found it it would work like this:
<SCRIPT LANGUAGE="JavaScript">
function click(which) {
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |