2007/5/10, Mattias Gaertner <[EMAIL PROTECTED]>:

Or, if the 'ok' button of the wince form is merely a 'default' button,
then
  if (TheForm.DefaultControl<>nil) then
    TheForm.DefaultControl.ExecuteDefaultAction;


Thanks Mattias! , I really like this solution as it also work for mbYes and
other. It work very well and I think this is safe to use because the
messagedialog default button is consistently set by ModalDefaultButton().

I also add IDCANCEL to execute TheForm.CancelControl.ExecuteCancelAction in
the same manner because I finally get SHDoneButton to change the OK button
by Cancel to test that, you must call it with parameter SHDB_SHOWCANCEL
whose value is $0004. I send the change for the wince RTL to add this
constant now.
Not sure if it is a good idea to put a Cancel button on the top bar but this
is good to have if someone need that.

If no other remark, I think this patch can be applied now.

Patrick

Attachment: wince_top_btn.patch
Description: Binary data

Reply via email to