wxAssociateWinWithHandle(hwnd, this);
- m_fnOldWndProc = (WXFARPROC) ::WinSubclassWindow(hwnd, wxWndProc);
- ::WinSetWindowULong(hwnd, QWS_USER, wxWndProc);
+ m_fnOldWndProc = (WXFARPROC) ::WinSubclassWindow(hwnd, (PFNWP)wxWndProc);
+ ::WinSetWindowULong(hwnd, QWS_USER, (ULONG)wxWndProc);
} // end of wxWindow::SubclassWin
void wxWindow::UnsubclassWin()
//
WXDWORD wxWindow::Determine3DEffects(
WXDWORD dwDefaultBorderStyle
-, YBool* pbWant3D
+, bool* pbWant3D
) const
{
- WXDWORD dwStyle = 0L;
-
+ WXDWORD dwStyle = 0L;
+
//
// Native PM does not have any specialize 3D effects like WIN32 does
//
if (::WinGetKeyState(HWND_DESKTOP, VK_SHIFT) != 0)
nState |= VK_SHIFT;
- if (::WinGetKeyState(HWND_DESKTOP, VK_CTRL) != 0;
+ if (::WinGetKeyState(HWND_DESKTOP, VK_CTRL) != 0);
nState |= VK_CTRL;
wxMouseEvent rEvent(wxEVT_LEAVE_WINDOW);
,vPoint.y
,nState
);
- (void)GetEventHandler()->ProcessEvent(event);
+ (void)GetEventHandler()->ProcessEvent(rEvent);
}
}
UpdateWindowUI();
RECTL vOs2Rect;
vOs2Rect.xLeft = pRect->x;
- vOS2Rect.yTop = pRect->y;
+ vOs2Rect.yTop = pRect->y;
vOs2Rect.xRight = pRect->x + pRect->width;
vOs2Rect.yBottom = pRect->y + pRect->height;
wxDropTarget* pDropTarget
)
{
- if (m_dropTarget != 0)
+ if (m_dropTarget != 0)
{
m_dropTarget->Revoke(m_hWnd);
delete m_dropTarget;
HWND hWnd = GetHwnd();
if (hWnd && bAccept)
- ::DragAcceptDroppedFiles(hWnd, NULL, NULL, DO_COPY, 0L);
+ ::DrgAcceptDroppedFiles(hWnd, NULL, NULL, DO_COPY, 0L);
} // end of wxWindow::DragAcceptFiles
// ----------------------------------------------------------------------------
{
wxWindowBase::DoSetToolTip(pTooltip);
- if (m_pTooltip)
+ if (m_tooltip)
m_tooltip->SetWindow(this);
} // end of wxWindow::DoSetToolTip
// ---------------------------------------------------------------------------
// Get total size
-void wxWindow::DoGetSize(
+void wxWindow::DoGetSize(
int* pWidth
, int* pHeight
) const
{
RECTL vRect2;
- ::WinQueryWindowRect(hParentWnd, vRect2);
+ ::WinQueryWindowRect(hParentWnd, &vRect2);
vPoint.x -= vRect.xLeft;
vPoint.y -= vRect.yBottom;
}
if (pX)
*pX = vPoint.x;
- if y)
+ if (pY)
*pY = vPoint.y;
} // end of wxWindow::DoGetPosition
) const
{
HWND hWnd = GetHwnd();
- RECTL vRect;
+ SWP vSwp;
+
+ ::WinQueryWindowPos(hWnd, &vSwp);
- ::WinQueryWindowPos(hWnd, &vRect);
-
if (pX)
- *pX -= vRect.xLeft;
+ *pX -= vSwp.x;
if (pY)
- *pY -= vRect.yBottom;
+ *pY -= vSwp.y;
} // end of wxWindow::DoScreenToClient
void wxWindow::DoClientToScreen(
) const
{
HWND hWnd = GetHwnd();
- RECTL vRect;
+ SWP vSwp;
- ::WinQueryWindowPos(hWnd, &vRect);
+ ::WinQueryWindowPos(hWnd, &vSwp);
if (pX)
- *pX += vRect.xLeft;
+ *pX += vSwp.x;
if (pY)
- *pY += vRect.yBottom;
+ *pY += vSwp.y;
} // end of wxWindow::DoClientToScreen
//
hWndClient = ::WinWindowFromID(GetHwnd(), FID_CLIENT);
::WinQueryWindowRect(hWndClient, &vRect);
- if (pX)
+ if (pWidth)
*pWidth = vRect.xRight;
- if (pY)
+ if (pHeight)
*pHeight = vRect.yTop;
} // end of wxWindow::DoGetClientSize
, int nHeight
)
{
- ::WinSetWindowPos(
- if ( !::MoveWindow( GetHwnd()
- ,HWND_TOP
- ,(LONG)nX
- ,(LONG)nY
- ,(LONG)nWidth
- ,(LONG)nHeight
- ,SWP_SIZE | SWP_MOVE
- ,
- ))
+ if ( !::WinSetWindowPos( GetHwnd()
+ ,HWND_TOP
+ ,(LONG)nX
+ ,(LONG)nY
+ ,(LONG)nWidth
+ ,(LONG)nHeight
+ ,SWP_SIZE | SWP_MOVE
+ ))
{
wxLogLastError("MoveWindow");
}
int nCurrentY;
int nCurrentWidth;
int nCurrentHeight;
- wxSize size(-1, -1);
+ wxSize vSize(-1, -1);
GetPosition( &nCurrentX
,&nCurrentY
//
// ... and don't do anything (avoiding flicker) if it's already ok
//
- if ( nX == nCurrentX &&
+ if ( nX == nCurrentX &&
nY == nCurrentY &&
- nWidth == nCurrentWidth &&
+ nWidth == nCurrentWidth &&
nHeight == nCurrentHeight
)
{
if (nX == -1 && !(nSizeFlags & wxSIZE_ALLOW_MINUS_ONE))
nX = nCurrentX;
- if (y == -1 && !(nSizeFlags & wxSIZE_ALLOW_MINUS_ONE))
+ if (nY == -1 && !(nSizeFlags & wxSIZE_ALLOW_MINUS_ONE))
nY = nCurrentY;
AdjustForParentClientOrigin( nX
RECT vRect2;
RECT vRect3;
- hWndClient = ::WinWindowFromID(GetHwnd(), FID_CLIENT);
+ hClientWnd = ::WinWindowFromID(GetHwnd(), FID_CLIENT);
::WinQueryWindowRect(hClientWnd, &vRect2);
if (pParent)
if (pParent)
{
vPoint.x -= vRect3.xLeft;
- vPoint.y -= vRect3.xBottom;
+ vPoint.y -= vRect3.yBottom;
}
DoMoveWindow( vPoint.x
if (!(nSizeFlags & wxSIZE_NO_ADJUSTMENTS) && pParent)
{
wxPoint vPoint(pParent->GetClientAreaOrigin());
- rX += vPoint.x;
+ rX += vPoint.x;
rY += vPoint.y;
}
}
hPs = ::WinGetPS(GetHwnd());
- if(!GipQueryFontMetrics(hPs, sizeof(FONTMETIRCS), &vFontMetrics);
+ if(!GpiQueryFontMetrics(hPs, sizeof(FONTMETRICS), &vFontMetrics))
return (0);
else
return(vFontMetrics.lMaxAscender + vFontMetrics.lMaxDescender);
int wxWindow::GetCharWidth() const
{
+ HPS hPs;
+ FONTMETRICS vFontMetrics;
+
hPs = ::WinGetPS(GetHwnd());
- if(!GipQueryFontMetrics(hPs, sizeof(FONTMETIRCS), &vFontMetrics);
+ if(!GpiQueryFontMetrics(hPs, sizeof(FONTMETRICS), &vFontMetrics))
return (0);
else
return(vFontMetrics.lAveCharWidth);
::WinReleasePS(hPs);
} // end of wxWindow::GetCharWidth
-void wxWindow::GetTextExtent(
+void wxWindow::GetTextExtent(
const wxString& rString
, int* pX
, int* pY