This patch add support for the small OK button that appear in the top menu
when a form borderstyle is bsDialog. This work as documented, this button send
WN_COMMAND with IDOK.
The patch directly set ModalResult to mrOK on this event, I am not sure if
this is the right way to do or if a LCL message must be raised for that?
Anyway it work and we can now close a modal form or a showmessage with this OK
button.
Patrick
Index: lcl/interfaces/wince/wincecallback.inc
===================================================================
--- lcl/interfaces/wince/wincecallback.inc (revision 11105)
+++ lcl/interfaces/wince/wincecallback.inc (working copy)
@@ -1127,6 +1127,11 @@
CBN_CLOSEUP:
UpdateComboBoxText(TCustomComboBox(lWinControl));
end;
+ { WINCE menubar OK button }
+ if WindowInfo^.WinControl is TCustomForm then
+ case lo(WParam) of
+ IDOK: TCustomForm(WindowInfo^.WinControl).ModalResult:=mrOK;
+ end;
end;
// no specific message found? try send a general msg