Avoid pointer conversions to unsigned long in the samples.

This results in errors when using g++ Win64 builds as sizeof(long) <
sizeof(void*) in Win64.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-10-29 19:20:15 +00:00
parent 222b65c1b6
commit 6f6609d233
2 changed files with 17 additions and 17 deletions

View File

@@ -2058,7 +2058,7 @@ void MyFrame::OnIdle( wxIdleEvent& WXUNUSED(event) )
#endif #endif
, s_windowFocus->GetName().c_str() , s_windowFocus->GetName().c_str()
#ifdef __WXMSW__ #ifdef __WXMSW__
, (unsigned int) s_windowFocus->GetHWND() , (unsigned)wxPtrToUInt(s_windowFocus->GetHWND())
#endif #endif
); );
} }

View File

@@ -171,42 +171,42 @@ SimpleTransientPopup::~SimpleTransientPopup()
void SimpleTransientPopup::Popup(wxWindow* WXUNUSED(focus)) void SimpleTransientPopup::Popup(wxWindow* WXUNUSED(focus))
{ {
wxLogMessage( wxT("0x%lx SimpleTransientPopup::Popup"), long(this) ); wxLogMessage( "%p SimpleTransientPopup::Popup", this );
wxPopupTransientWindow::Popup(); wxPopupTransientWindow::Popup();
} }
void SimpleTransientPopup::OnDismiss() void SimpleTransientPopup::OnDismiss()
{ {
wxLogMessage( wxT("0x%lx SimpleTransientPopup::OnDismiss"), long(this) ); wxLogMessage( "%p SimpleTransientPopup::OnDismiss", this );
wxPopupTransientWindow::OnDismiss(); wxPopupTransientWindow::OnDismiss();
} }
bool SimpleTransientPopup::ProcessLeftDown(wxMouseEvent& event) bool SimpleTransientPopup::ProcessLeftDown(wxMouseEvent& event)
{ {
wxLogMessage( wxT("0x%lx SimpleTransientPopup::ProcessLeftDown pos(%d, %d)"), long(this), event.GetX(), event.GetY()); wxLogMessage( "%p SimpleTransientPopup::ProcessLeftDown pos(%d, %d)", this, event.GetX(), event.GetY());
return wxPopupTransientWindow::ProcessLeftDown(event); return wxPopupTransientWindow::ProcessLeftDown(event);
} }
bool SimpleTransientPopup::Show( bool show ) bool SimpleTransientPopup::Show( bool show )
{ {
wxLogMessage( wxT("0x%lx SimpleTransientPopup::Show %d"), long(this), int(show)); wxLogMessage( "%p SimpleTransientPopup::Show %d", this, int(show));
return wxPopupTransientWindow::Show(show); return wxPopupTransientWindow::Show(show);
} }
void SimpleTransientPopup::OnSize(wxSizeEvent &event) void SimpleTransientPopup::OnSize(wxSizeEvent &event)
{ {
wxLogMessage( wxT("0x%lx SimpleTransientPopup::OnSize"), long(this) ); wxLogMessage( "%p SimpleTransientPopup::OnSize", this );
event.Skip(); event.Skip();
} }
void SimpleTransientPopup::OnSetFocus(wxFocusEvent &event) void SimpleTransientPopup::OnSetFocus(wxFocusEvent &event)
{ {
wxLogMessage( wxT("0x%lx SimpleTransientPopup::OnSetFocus"), long(this) ); wxLogMessage( "%p SimpleTransientPopup::OnSetFocus", this );
event.Skip(); event.Skip();
} }
void SimpleTransientPopup::OnKillFocus(wxFocusEvent &event) void SimpleTransientPopup::OnKillFocus(wxFocusEvent &event)
{ {
wxLogMessage( wxT("0x%lx SimpleTransientPopup::OnKillFocus"), long(this) ); wxLogMessage( "%p SimpleTransientPopup::OnKillFocus", this );
event.Skip(); event.Skip();
} }
@@ -220,8 +220,8 @@ void SimpleTransientPopup::OnMouse(wxMouseEvent &event)
if (rect.Contains(event.GetPosition())) if (rect.Contains(event.GetPosition()))
{ {
colour = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT); colour = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT);
wxLogMessage( wxT("0x%lx SimpleTransientPopup::OnMouse pos(%d, %d)"), wxLogMessage( "%p SimpleTransientPopup::OnMouse pos(%d, %d)",
long(event.GetEventObject()), event.GetX(), event.GetY()); event.GetEventObject(), event.GetX(), event.GetY());
} }
if (colour != m_mouseText->GetBackgroundColour()) if (colour != m_mouseText->GetBackgroundColour())
@@ -234,7 +234,7 @@ void SimpleTransientPopup::OnMouse(wxMouseEvent &event)
void SimpleTransientPopup::OnButton(wxCommandEvent& event) void SimpleTransientPopup::OnButton(wxCommandEvent& event)
{ {
wxLogMessage( wxT("0x%lx SimpleTransientPopup::OnButton ID %d"), long(this), event.GetId()); wxLogMessage( "%p SimpleTransientPopup::OnButton ID %d", this, event.GetId());
wxButton *button = wxDynamicCast(event.GetEventObject(), wxButton); wxButton *button = wxDynamicCast(event.GetEventObject(), wxButton);
if (button->GetLabel() == wxT("Press Me")) if (button->GetLabel() == wxT("Press Me"))
@@ -247,8 +247,8 @@ void SimpleTransientPopup::OnButton(wxCommandEvent& event)
void SimpleTransientPopup::OnSpinCtrl(wxSpinEvent& event) void SimpleTransientPopup::OnSpinCtrl(wxSpinEvent& event)
{ {
wxLogMessage( wxT("0x%lx SimpleTransientPopup::OnSpinCtrl ID %d Value %d"), wxLogMessage( "%p SimpleTransientPopup::OnSpinCtrl ID %d Value %d",
long(this), event.GetId(), event.GetInt()); this, event.GetId(), event.GetInt());
event.Skip(); event.Skip();
} }
@@ -412,7 +412,7 @@ void MyFrame::OnStartSimplePopup(wxCommandEvent& event)
wxPoint pos = btn->ClientToScreen( wxPoint(0,0) ); wxPoint pos = btn->ClientToScreen( wxPoint(0,0) );
wxSize sz = btn->GetSize(); wxSize sz = btn->GetSize();
m_simplePopup->Position( pos, sz ); m_simplePopup->Position( pos, sz );
wxLogMessage( wxT("0x%lx Simple Popup Shown pos(%d, %d) size(%d, %d)"), long(m_simplePopup), pos.x, pos.y, sz.x, sz.y ); wxLogMessage( "%p Simple Popup Shown pos(%d, %d) size(%d, %d)", m_simplePopup, pos.x, pos.y, sz.x, sz.y );
m_simplePopup->Popup(); m_simplePopup->Popup();
} }
@@ -425,7 +425,7 @@ void MyFrame::OnStartScrolledPopup(wxCommandEvent& event)
wxPoint pos = btn->ClientToScreen( wxPoint(0,0) ); wxPoint pos = btn->ClientToScreen( wxPoint(0,0) );
wxSize sz = btn->GetSize(); wxSize sz = btn->GetSize();
m_scrolledPopup->Position( pos, sz ); m_scrolledPopup->Position( pos, sz );
wxLogMessage( wxT("0x%lx Scrolled Popup Shown pos(%d, %d) size(%d, %d)"), long(m_scrolledPopup), pos.x, pos.y, sz.x, sz.y ); wxLogMessage( "%p Scrolled Popup Shown pos(%d, %d) size(%d, %d)", m_scrolledPopup, pos.x, pos.y, sz.x, sz.y );
m_scrolledPopup->Popup(); m_scrolledPopup->Popup();
} }
@@ -488,7 +488,7 @@ void MyDialog::OnStartSimplePopup(wxCommandEvent& event)
wxPoint pos = btn->ClientToScreen( wxPoint(0,0) ); wxPoint pos = btn->ClientToScreen( wxPoint(0,0) );
wxSize sz = btn->GetSize(); wxSize sz = btn->GetSize();
m_simplePopup->Position( pos, sz ); m_simplePopup->Position( pos, sz );
wxLogMessage( wxT("0x%lx Dialog Simple Popup Shown pos(%d, %d) size(%d, %d)"), long(m_simplePopup), pos.x, pos.y, sz.x, sz.y ); wxLogMessage( "%p Dialog Simple Popup Shown pos(%d, %d) size(%d, %d)", m_simplePopup, pos.x, pos.y, sz.x, sz.y );
m_simplePopup->Popup(); m_simplePopup->Popup();
} }
@@ -501,6 +501,6 @@ void MyDialog::OnStartScrolledPopup(wxCommandEvent& event)
wxPoint pos = btn->ClientToScreen( wxPoint(0,0) ); wxPoint pos = btn->ClientToScreen( wxPoint(0,0) );
wxSize sz = btn->GetSize(); wxSize sz = btn->GetSize();
m_scrolledPopup->Position( pos, sz ); m_scrolledPopup->Position( pos, sz );
wxLogMessage( wxT("0x%lx Dialog Scrolled Popup Shown pos(%d, %d) size(%d, %d)"), long(m_scrolledPopup), pos.x, pos.y, sz.x, sz.y ); wxLogMessage( "%p Dialog Scrolled Popup Shown pos(%d, %d) size(%d, %d)", m_scrolledPopup, pos.x, pos.y, sz.x, sz.y );
m_scrolledPopup->Popup(); m_scrolledPopup->Popup();
} }