Show the OK button in the title bar under PocketPC
and react to pressing it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7127d12912
commit
0fc58b86fb
@ -440,6 +440,22 @@ WXLRESULT wxDialog::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPar
|
||||
|
||||
switch ( message )
|
||||
{
|
||||
#ifdef __WXWINCE__
|
||||
// react to pressing the OK button in the title
|
||||
case WM_COMMAND:
|
||||
if (LOWORD(wParam) == IDOK)
|
||||
{
|
||||
wxButton *btn = wxDynamicCast(FindWindow(wxID_CANCEL), wxButton);
|
||||
if ( btn && btn->IsEnabled() )
|
||||
{
|
||||
// if we do have a cancel button, do press it
|
||||
btn->MSWCommand(BN_CLICKED, 0 /* unused */);
|
||||
processed = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case WM_CLOSE:
|
||||
// if we can't close, tell the system that we processed the
|
||||
// message - otherwise it would close us
|
||||
|
@ -915,7 +915,7 @@ void wxTopLevelWindowMSW::OnActivate(wxActivateEvent& event)
|
||||
|
||||
// the DialogProc for all wxWindows dialogs
|
||||
LONG APIENTRY _EXPORT
|
||||
wxDlgProc(HWND WXUNUSED(hDlg),
|
||||
wxDlgProc(HWND hDlg,
|
||||
UINT message,
|
||||
WPARAM WXUNUSED(wParam),
|
||||
LPARAM WXUNUSED(lParam))
|
||||
@ -926,6 +926,16 @@ wxDlgProc(HWND WXUNUSED(hDlg),
|
||||
// for this message, returning TRUE tells system to set focus to
|
||||
// the first control in the dialog box, but as we set the focus
|
||||
// ourselves, we return FALSE from here as well, so fall through
|
||||
#ifdef __WXWINCE__
|
||||
{
|
||||
SHINITDLGINFO shidi;
|
||||
shidi.dwMask = SHIDIM_FLAGS;
|
||||
shidi.dwFlags = SHIDIF_DONEBUTTON |
|
||||
SHIDIF_SIZEDLGFULLSCREEN;
|
||||
shidi.hDlg = hDlg;
|
||||
SHInitDialog( &shidi );
|
||||
}
|
||||
#endif
|
||||
|
||||
default:
|
||||
// for all the other ones, FALSE means that we didn't process the
|
||||
|
Loading…
Reference in New Issue
Block a user