Statusbar updates.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -472,6 +472,7 @@ wxStatusBar* wxFrame::OnCreateStatusBar(
|
||||
SWP vSwp;
|
||||
ERRORID vError;
|
||||
wxString sError;
|
||||
HWND hWnd;
|
||||
|
||||
pStatusBar = wxFrameBase::OnCreateStatusBar( nNumber
|
||||
,lulStyle
|
||||
@@ -483,25 +484,26 @@ wxStatusBar* wxFrame::OnCreateStatusBar(
|
||||
// is the handle to the client window of the frame. We don't want that,
|
||||
// so we have to set the parent to actually be the Frame.
|
||||
//
|
||||
::WinSetParent(pStatusBar->GetHWND(), m_hFrame, FALSE);
|
||||
hWnd = pStatusBar->GetHWND();
|
||||
if (!::WinSetParent(hWnd, m_hFrame, FALSE))
|
||||
{
|
||||
vError = ::WinGetLastError(vHabmain);
|
||||
sError = wxPMErrorToStr(vError);
|
||||
wxLogError("Error setting parent for submenu. Error: %s\n", sError);
|
||||
return NULL;
|
||||
wxLogError("Error setting parent for statusbar. Error: %s\n", sError);
|
||||
// return NULL;
|
||||
}
|
||||
|
||||
//
|
||||
// Also we need to reset it positioning to enable the SHOW attribute
|
||||
//
|
||||
if (!::WinQueryWindowPos(pStatusBar->GetHWND(), &vSwp))
|
||||
if (!::WinQueryWindowPos((HWND)pStatusBar->GetHWND(), &vSwp))
|
||||
{
|
||||
vError = ::WinGetLastError(vHabmain);
|
||||
sError = wxPMErrorToStr(vError);
|
||||
wxLogError("Error setting parent for submenu. Error: %s\n", sError);
|
||||
wxLogError("Error querying frame for statusbar position. Error: %s\n", sError);
|
||||
return NULL;
|
||||
}
|
||||
if (!::WinSetWindowPos( pStatusBar->GetHWND()
|
||||
if (!::WinSetWindowPos( (HWND)pStatusBar->GetHWND()
|
||||
,HWND_TOP
|
||||
,vSwp.cx
|
||||
,vSwp.cy
|
||||
@@ -512,7 +514,7 @@ wxStatusBar* wxFrame::OnCreateStatusBar(
|
||||
{
|
||||
vError = ::WinGetLastError(vHabmain);
|
||||
sError = wxPMErrorToStr(vError);
|
||||
wxLogError("Error setting parent for submenu. Error: %s\n", sError);
|
||||
wxLogError("Error setting statusbar position. Error: %s\n", sError);
|
||||
return NULL;
|
||||
}
|
||||
return pStatusBar;
|
||||
|
@@ -325,17 +325,20 @@ bool wxMenu::DoInsertOrAppend(
|
||||
|
||||
if (nPos == (size_t)-1)
|
||||
{
|
||||
rItem.iPosition = MIT_END;
|
||||
rItem.iPosition = MIT_END;
|
||||
}
|
||||
else
|
||||
{
|
||||
rItem.iPosition = nPos;
|
||||
rItem.iPosition = nPos;
|
||||
}
|
||||
|
||||
APIRET rc;
|
||||
|
||||
rc = (APIRET)::WinSendMsg(GetHmenu(), MM_INSERTITEM,
|
||||
(MPARAM)&rItem, (MPARAM)pData);
|
||||
rc = (APIRET)::WinSendMsg( GetHmenu()
|
||||
,MM_INSERTITEM
|
||||
,(MPARAM)&rItem
|
||||
,(MPARAM)pData
|
||||
);
|
||||
if (rc == MIT_MEMERROR || rc == MIT_ERROR)
|
||||
{
|
||||
vError = ::WinGetLastError(vHabmain);
|
||||
|
Reference in New Issue
Block a user