WinCE patches from "Viktor Voroshylo" <viktor@voroshylo.com>
1) to take care of ShowFullScreen. 2) will make WinCE context menu in listctrl to generate the same event as right click. WinCE does not have right click so I think it is reasonable solution for it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -45,6 +45,12 @@
|
|||||||
|
|
||||||
#include "wx/msw/private.h"
|
#include "wx/msw/private.h"
|
||||||
|
|
||||||
|
#if defined(__WXWINCE__)
|
||||||
|
#include <ole2.h>
|
||||||
|
#include <shellapi.h>
|
||||||
|
#include <aygshell.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
// include <commctrl.h> "properly"
|
// include <commctrl.h> "properly"
|
||||||
#include "wx/msw/wrapcctl.h"
|
#include "wx/msw/wrapcctl.h"
|
||||||
|
|
||||||
@@ -1802,6 +1808,9 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
event.m_col = nmHDR->iItem;
|
event.m_col = nmHDR->iItem;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef __WXWINCE__
|
||||||
|
case GN_CONTEXTMENU:
|
||||||
|
#endif __WXWINCE__
|
||||||
case NM_RCLICK:
|
case NM_RCLICK:
|
||||||
{
|
{
|
||||||
eventType = wxEVT_COMMAND_LIST_COL_RIGHT_CLICK;
|
eventType = wxEVT_COMMAND_LIST_COL_RIGHT_CLICK;
|
||||||
@@ -2128,6 +2137,9 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
event.m_item.m_data = GetItemData(iItem);
|
event.m_item.m_data = GetItemData(iItem);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef __WXWINCE__
|
||||||
|
case GN_CONTEXTMENU:
|
||||||
|
#endif __WXWINCE__
|
||||||
case NM_RCLICK:
|
case NM_RCLICK:
|
||||||
// if the user processes it in wxEVT_COMMAND_RIGHT_CLICK(),
|
// if the user processes it in wxEVT_COMMAND_RIGHT_CLICK(),
|
||||||
// don't do anything else
|
// don't do anything else
|
||||||
|
@@ -41,6 +41,13 @@
|
|||||||
#include "wx/module.h"
|
#include "wx/module.h"
|
||||||
|
|
||||||
#include "wx/msw/private.h"
|
#include "wx/msw/private.h"
|
||||||
|
|
||||||
|
#if defined(__WXWINCE__)
|
||||||
|
#include <ole2.h>
|
||||||
|
#include <shellapi.h>
|
||||||
|
#include <aygshell.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wx/msw/winundef.h"
|
#include "wx/msw/winundef.h"
|
||||||
|
|
||||||
// This can't be undefed in winundef.h or
|
// This can't be undefed in winundef.h or
|
||||||
@@ -697,10 +704,13 @@ bool wxTopLevelWindowMSW::ShowFullScreen(bool show, long style)
|
|||||||
else // fall back to the main desktop
|
else // fall back to the main desktop
|
||||||
#else // wxUSE_DISPLAY
|
#else // wxUSE_DISPLAY
|
||||||
{
|
{
|
||||||
// FIXME: implement for WinCE
|
|
||||||
#ifndef __WXWINCE__
|
|
||||||
// resize to the size of the desktop
|
// resize to the size of the desktop
|
||||||
wxCopyRECTToRect(wxGetWindowRect(::GetDesktopWindow()), rect);
|
wxCopyRECTToRect(wxGetWindowRect(::GetDesktopWindow()), rect);
|
||||||
|
#ifdef __WXWINCE__
|
||||||
|
// FIXME: size of the bottom menu (toolbar)
|
||||||
|
// should be taken in account
|
||||||
|
rect.height += rect.y;
|
||||||
|
rect.y = 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif // wxUSE_DISPLAY
|
#endif // wxUSE_DISPLAY
|
||||||
@@ -727,12 +737,19 @@ bool wxTopLevelWindowMSW::ShowFullScreen(bool show, long style)
|
|||||||
rect.x, rect.y, rect.width, rect.height,
|
rect.x, rect.y, rect.width, rect.height,
|
||||||
flags);
|
flags);
|
||||||
|
|
||||||
|
#ifdef __WXWINCE__
|
||||||
|
::SHFullScreen(GetHwnd(), SHFS_HIDETASKBAR | SHFS_HIDESIPBUTTON);
|
||||||
|
#endif
|
||||||
|
|
||||||
// finally send an event allowing the window to relayout itself &c
|
// finally send an event allowing the window to relayout itself &c
|
||||||
wxSizeEvent event(rect.GetSize(), GetId());
|
wxSizeEvent event(rect.GetSize(), GetId());
|
||||||
GetEventHandler()->ProcessEvent(event);
|
GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
else // stop showing full screen
|
else // stop showing full screen
|
||||||
{
|
{
|
||||||
|
#ifdef __WXWINCE__
|
||||||
|
::SHFullScreen(GetHwnd(), SHFS_SHOWTASKBAR | SHFS_SHOWSIPBUTTON);
|
||||||
|
#endif
|
||||||
Maximize(m_fsIsMaximized);
|
Maximize(m_fsIsMaximized);
|
||||||
SetWindowLong(GetHwnd(),GWL_STYLE, m_fsOldWindowStyle);
|
SetWindowLong(GetHwnd(),GWL_STYLE, m_fsOldWindowStyle);
|
||||||
SetWindowPos(GetHwnd(),HWND_TOP,m_fsOldSize.x, m_fsOldSize.y,
|
SetWindowPos(GetHwnd(),HWND_TOP,m_fsOldSize.x, m_fsOldSize.y,
|
||||||
|
Reference in New Issue
Block a user