projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correct printf() format specifiers for long variables in life demo.
[wxWidgets.git]
/
src
/
os2
/
window.cpp
diff --git
a/src/os2/window.cpp
b/src/os2/window.cpp
index b0f1d701181668bea5295450872deb69f552b1c0..fdf6d3a87b37ad49090b6f8d11559e2e868fddb0 100644
(file)
--- a/
src/os2/window.cpp
+++ b/
src/os2/window.cpp
@@
-352,7
+352,9
@@
wxWindowOS2::~wxWindowOS2()
if (m_hWnd)
{
if(!::WinDestroyWindow(GetHWND()))
if (m_hWnd)
{
if(!::WinDestroyWindow(GetHWND()))
+ {
wxLogLastError(wxT("DestroyWindow"));
wxLogLastError(wxT("DestroyWindow"));
+ }
//
// remove hWnd <-> wxWindow association
//
//
// remove hWnd <-> wxWindow association
//
@@
-384,7
+386,7
@@
bool wxWindowOS2::Create( wxWindow* pParent,
// static box
//
wxASSERT_MSG( !wxDynamicCast(pParent, wxStaticBox),
// static box
//
wxASSERT_MSG( !wxDynamicCast(pParent, wxStaticBox),
-
_
T("wxStaticBox can't be used as a window parent!") );
+
wx
T("wxStaticBox can't be used as a window parent!") );
#endif // wxUSE_STATBOX
// Ensure groupbox backgrounds are painted
#endif // wxUSE_STATBOX
// Ensure groupbox backgrounds are painted
@@
-454,7
+456,7
@@
bool wxWindowOS2::Create( wxWindow* pParent,
void wxWindowOS2::SetFocus()
{
HWND hWnd = GetHwnd();
void wxWindowOS2::SetFocus()
{
HWND hWnd = GetHwnd();
- wxCHECK_RET( hWnd,
_
T("can't set focus to invalid window") );
+ wxCHECK_RET( hWnd,
wx
T("can't set focus to invalid window") );
if (hWnd)
::WinSetFocus(HWND_DESKTOP, hWnd);
if (hWnd)
::WinSetFocus(HWND_DESKTOP, hWnd);
@@
-1786,7
+1788,6
@@
bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu, int nX, int nY )
bool bIsWaiting = true;
int nHeight;
bool bIsWaiting = true;
int nHeight;
- pMenu->SetInvokingWindow(this);
pMenu->UpdateUI();
if ( nX == -1 && nY == -1 )
pMenu->UpdateUI();
if ( nX == -1 && nY == -1 )
@@
-1822,7
+1823,6
@@
bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu, int nX, int nY )
::WinDispatchMsg(vHabmain, (PQMSG)&vMsg);
}
::WinDispatchMsg(vHabmain, (PQMSG)&vMsg);
}
- pMenu->SetInvokingWindow(NULL);
return true;
} // end of wxWindowOS2::DoPopupMenu
#endif // wxUSE_MENUS_NATIVE
return true;
} // end of wxWindowOS2::DoPopupMenu
#endif // wxUSE_MENUS_NATIVE
@@
-2853,7
+2853,7
@@
void wxAssociateWinWithHandle(
{
wxString Newstr(pWin->GetClassInfo()->GetClassName());
wxString Oldstr(pOldWin->GetClassInfo()->GetClassName());
{
wxString Newstr(pWin->GetClassInfo()->GetClassName());
wxString Oldstr(pOldWin->GetClassInfo()->GetClassName());
- wxLogError(
_
T("Bug! New window of class %s has same HWND %X as old window of class %s"),
+ wxLogError(
wx
T("Bug! New window of class %s has same HWND %X as old window of class %s"),
Newstr.c_str(),
(int)hWnd,
Oldstr.c_str()
Newstr.c_str(),
(int)hWnd,
Oldstr.c_str()
@@
-2999,7
+2999,7
@@
bool wxWindowOS2::OS2Create( PSZ zClass,
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
- wxLogError(
_
T("Error creating frame. Error: %s\n"), sError.c_str());
+ wxLogError(
wx
T("Error creating frame. Error: %s\n"), sError.c_str());
return false;
}
SetSize( nX
return false;
}
SetSize( nX
@@
-3038,11
+3038,7
@@
bool wxWindowOS2::HandleDestroy()
// Delete our drop target if we've got one
//
#if wxUSE_DRAG_AND_DROP
// Delete our drop target if we've got one
//
#if wxUSE_DRAG_AND_DROP
- if (m_dropTarget != NULL)
- {
- delete m_dropTarget;
- m_dropTarget = NULL;
- }
+ wxDELETE(m_dropTarget);
#endif // wxUSE_DRAG_AND_DROP
//
#endif // wxUSE_DRAG_AND_DROP
//
@@
-3222,7
+3218,7
@@
bool wxWindowOS2::OS2OnDrawItem( int vId,
,pMeasureStruct->rclItem.yTop - pMeasureStruct->rclItem.yBottom
);
,pMeasureStruct->rclItem.yTop - pMeasureStruct->rclItem.yBottom
);
- wxPMDCImpl *impl = (wxPMDCImpl*) vDc.GetImpl();
+
wxPMDCImpl *impl = (wxPMDCImpl*) vDc.GetImpl();
impl->SetHDC( hDC, false );
impl->SetHPS( pMeasureStruct->hps );
//
impl->SetHDC( hDC, false );
impl->SetHPS( pMeasureStruct->hps );
//
@@
-3238,7
+3234,7
@@
bool wxWindowOS2::OS2OnDrawItem( int vId,
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
- wxLogError(
_
T("Unable to set current color table (1). Error: %s\n"), sError.c_str());
+ wxLogError(
wx
T("Unable to set current color table (1). Error: %s\n"), sError.c_str());
}
//
// Set the color table to RGB mode
}
//
// Set the color table to RGB mode
@@
-3253,7
+3249,7
@@
bool wxWindowOS2::OS2OnDrawItem( int vId,
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
- wxLogError(
_
T("Unable to set current color table (2). Error: %s\n"), sError.c_str());
+ wxLogError(
wx
T("Unable to set current color table (2). Error: %s\n"), sError.c_str());
}
wxCHECK( pMenuItem->IsKindOf(CLASSINFO(wxMenuItem)), FALSE );
}
wxCHECK( pMenuItem->IsKindOf(CLASSINFO(wxMenuItem)), FALSE );