Paul Heinz said..
>I haven't been following this thread that closely but is there a
>reason you can't just use tests that always test against explicit mrYes?
>
>Seeing as clicking the [x] box returns a ModalResult of 0 (from memory),
>it's still a distinct value different from mrYes.
The result returned is mrCancel which, in this case was not one of the buttons and we
had only tested if it was mrNo - which it wasn't so the code incorrectly went ahead
assuming the user selected mrYes. Just a wee trap is all and I thought it worth
repeating on here.
>> We also figured it wouldn't take much to write our own MessageDlg
>> - but again we had to slap ourselves around the head a few times
>> repeating "Don't re-invent the wheel" until we accepted what was
>> given to us to work with.
>
>IMO, that's a somewhat limiting attitude.
>
>We decided to reimplement our own MessageDlgHtml so that we
>could have Profax standard glyphs and keyboard handling on the buttons and
>pass in
>which button to focus and an optional HelpTopic for our HtmlHelp.
>
>MessageDlg is a pretty small wheel and it's not at all hard to copy the code
>and tweak it.
As I said Paul, "it wouldn't take much to write our own.." however, I'm a great
believer in using the model we have been given. Much though I hate the Microsoft
Windows model and some of it's idiotics, it's what the user knows and expects.
It's also very easy to get tied up with writting lots and lots of nifty code that
takes all our time away from writing the application itself. We have such a large
application that all our time is being used up in making enhancements and additions to
the application itself, if we even start down the road to writing our own standard
dialogs then we may produce nicer dialogs but the users will suffer as we will have
neglected the application itself to do something that it already does.
Besides, the idea of replacing all references to MessageDlg with MyMessageDlg in the
amount of code we have here was a fairly daunting task.
Steve
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"