Message. Returnvalue=https://bbs.csdn.net/topics/1
And
What is the difference between retrn 1?
Check again the user manual, also didn't see
The two methods, in the absence of inheritance, can rise to prevent the effect of the processing of the current event;
But in case, have inherited the first method is invalid, such as the theory is about the base class or subclass,
Originally with the normal code, after I switch to inherit, abnormal, who understand what is going on?
I am ok to return 1, want to know why in this way,
CodePudding user response:
One is to provide to valueCodePudding user response:
Just prepare, there has been no returnAnother is direct to bring value back to
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
I understand, so I do not know if there is any misunderstanding,
CodePudding user response:
Message. Processed user-defined events or other event handler set of values, his role is to indicate the further handling of the incident, the value to true after the execution of the current event event handler calls the default window procedure, or false on default values, the implementation of the current event after the event handler calls the default window procedureMessage. ReturnValue when Message. Processed when the attribute value is true, the parameter values assigned to return to the value of the Windows, if the Message Processed to false, this parameter is ignored
CodePudding user response:
Processed Boolean A Boolean value set in the script for the user - defined event or the Other event. The Values are:? True? The script processed The event; Do not call the default window Proc (DefWindowProc) after the event has had been processed.
? False? (the Default) Call DefWindowProc after the event has had been processed.
ReturnValue Long When Message. Processed is True, specifies the value you want returned to Windows. This property is ignored When the Message. The Processed is False.
CodePudding user response:
For example a form; W_1, it has a CloseQuery events, when performing the CloseQuery events, original concept will check Message. RuturnValue values, if 1, will not close this window.CloseQuery event code is as follows;
If messagebox (" out of the window ", "really want to quit?" That question! Yesno!) <> 1 then
message.returnvalue=https://bbs.csdn.net/topics/1
End the if
Executes, open up, click the close button, trigger CloseQuery events at this time, implement the handler, talk about a prompt box, if choose "no", then set the Message in the event handler. ReturnValue is 1, cancel the close; Choose "yes" to be closed form
CodePudding user response:
Well, help on saidThe above example is a post,
In fact, this example, the message. The returnvalue=https://bbs.csdn.net/topics/1 to return 1
Effect is the same as
That is to say, they are generally equivalent
I was written in the event of an have inherited this code, the first way is invalid, either wrote of the parent class events, or in a subclass of events within the
CodePudding user response:
This can explain the Sybase documentation is not completeCodePudding user response: