git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8636
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
dc.SetBackgroundMode(wxTRANSPARENT);
#ifdef __WXPM__
dc.SetBackgroundMode(wxTRANSPARENT);
#ifdef __WXPM__
- ::WinFillRect(vDC.m_hPS, &vDC.m_rclPaint, CLR_GREEN);
+ ::WinFillRect(dc.m_hPS, &dc.m_vRclPaint, CLR_GREEN);
#endif
for ( i = 0; i < m_nFields; i ++ )
#endif
for ( i = 0; i < m_nFields; i ++ )
- ::GpiQueryAttrs(hPS // presentation-space handle
- PRIM_CHAR // Char primitive.
- CBB_BACK_COLOR // Background color.
- &vCbnd // buffer for attributes.
+ ::GpiQueryAttrs( hPS // presentation-space handle
+ ,PRIM_CHAR // Char primitive.
+ ,CBB_BACK_COLOR // Background color.
+ ,&vCbnd // buffer for attributes.
+ );
return vCbnd.lBackColor;
}
return vCbnd.lBackColor;
}
}
void wxDC::DoDrawRectangle(
}
void wxDC::DoDrawRectangle(
, wxCoord vY
, wxCoord vWidth
, wxCoord vHeight
, wxCoord vY
, wxCoord vWidth
, wxCoord vHeight
vPoint[0].x = vX;
vPoint[0].y = vY;
vPoint[0].x = vX;
vPoint[0].y = vY;
- vPoint[1].x = vX + Width;
- vPoint[1].y = vY - Height; //mustdie !!! ??
+ vPoint[1].x = vX + vWidth;
+ vPoint[1].y = vY - vHeight; //mustdie !!! ??
::GpiMove(m_hPS, &vPoint[0]);
::GpiBox( m_hPS // handle to a presentation space
::GpiMove(m_hPS, &vPoint[0]);
::GpiBox( m_hPS // handle to a presentation space
vPoint[1].y = vY + vHeight; //or -height aka mustdie !!! ??
::GpiMove(m_hPS, &vPoint[0]);
vPoint[1].y = vY + vHeight; //or -height aka mustdie !!! ??
::GpiMove(m_hPS, &vPoint[0]);
- ::GpiBox( m_hPS // handle to a presentation space
- ,DRO_OUTLINE // draw the box outline ? or ?
- ,&vPoint[1] // address of the corner
- ,(LONG)radius // horizontal corner radius
- ,(LONG)radius // vertical corner radius
+ ::GpiBox( m_hPS // handle to a presentation space
+ ,DRO_OUTLINE // draw the box outline ? or ?
+ ,&vPoint[1] // address of the corner
+ ,(LONG)dRadius // horizontal corner radius
+ ,(LONG)dRadius // vertical corner radius
- ( fabs((double) XLOG2DEVREL(width)) +
- fabs((double) YLOG2DEVREL(width))
+ ( fabs((double) XLOG2DEVREL(nWidth)) +
+ fabs((double) YLOG2DEVREL(nWidth))
) / 2.0;
nWidth = (int)dW;
}
) / 2.0;
nWidth = (int)dW;
}
const wxString& rsString
, wxCoord* pvX
, wxCoord* pvY
const wxString& rsString
, wxCoord* pvX
, wxCoord* pvY
, wxCoord* pvExternalLeading
, wxFont* pTheFont
) const
, wxCoord* pvExternalLeading
, wxFont* pTheFont
) const
,pStr
,TXTBOX_COUNT // return maximum information
,avPoint // array of coordinates points
,pStr
,TXTBOX_COUNT // return maximum information
,avPoint // array of coordinates points
if(!bRc)
{
vErrorCode = ::WinGetLastError(wxGetInstance());
if(!bRc)
{
vErrorCode = ::WinGetLastError(wxGetInstance());
*pvY = (wxCoord)(vPtMax.y - vPtMin.y + 1);
if (pvDescent)
*pvDescent = vFM.lMaxDescender;
*pvY = (wxCoord)(vPtMax.y - vPtMin.y + 1);
if (pvDescent)
*pvDescent = vFM.lMaxDescender;
*pvExternalLeading = vFM.lExternalLeading;
}
*pvExternalLeading = vFM.lExternalLeading;
}
m_hDC = (WXHDC) ::WinOpenWindowDC(GetWinHwnd(the_canvas));
m_hPS = ::GpiCreatePS( wxGetInstance()
,m_hDC
m_hDC = (WXHDC) ::WinOpenWindowDC(GetWinHwnd(the_canvas));
m_hPS = ::GpiCreatePS( wxGetInstance()
,m_hDC
,PU_PELS | GPIF_LONG | GPIA_ASSOC
);
,PU_PELS | GPIF_LONG | GPIA_ASSOC
);
- wxCHECK_RET( canvas, wxT("NULL canvas in wxPaintDC ctor") );
+ wxCHECK_RET(pCanvas, wxT("NULL canvas in wxPaintDC ctor"));
#ifdef __WXDEBUG__
if (g_isPainting <= 0)
#ifdef __WXDEBUG__
if (g_isPainting <= 0)
if ( !--info->count )
{
::WinEndPaint(m_hPS);
if ( !--info->count )
{
::WinEndPaint(m_hPS);
m_bIsPaintTime = FALSE;
ms_cache.Remove(index);
}
m_bIsPaintTime = FALSE;
ms_cache.Remove(index);
}
HWND hWnd0 = NULLHANDLE;
hWnd = GetHwnd();
HWND hWnd0 = NULLHANDLE;
hWnd = GetHwnd();
// Find the wxWindow at the current mouse position, returning the mouse
// position.
// Find the wxWindow at the current mouse position, returning the mouse
// position.
-wxWindow* wxFindWindowAtPointer(wxPoint& pt)
+wxWindow* wxFindWindowAtPointer(
+ wxPoint& rPt
+)
{
return wxFindWindowAtPoint(wxGetMousePosition());
}
{
return wxFindWindowAtPoint(wxGetMousePosition());
}
-wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
+wxWindow* wxFindWindowAtPoint(
+ const wxPoint& rPt
+)
- POINT pt2;
- pt2.x = pt.x;
- pt2.y = pt.y;
- HWND hWndHit = ::WindowFromPoint(pt2);
- wxWindow* win = wxFindWinFromHandle((WXHWND) hWndHit) ;
- HWND hWnd = hWndHit;
+ vPt2.x = rPt.x;
+ vPt2.y = rPt.y;
+ HWND hWndHit = ::WinWindowFromPoint(HWND_DESKTOP, &vPt2, FALSE);
+ wxWindow* pWin = wxFindWinFromHandle((WXHWND)hWndHit) ;
+ HWND hWnd = hWndHit;
+
+ //
// Try to find a window with a wxWindow associated with it
// Try to find a window with a wxWindow associated with it
- while (!win && (hWnd != 0))
+ //
+ while (!pWin && (hWnd != 0))
- hWnd = ::GetParent(hWnd);
- win = wxFindWinFromHandle((WXHWND) hWnd) ;
+ hWnd = ::WinQueryWindow(hWnd, QW_PARENT);
+ pWin = wxFindWinFromHandle((WXHWND)hWnd) ;
+// Get the current mouse position.
+wxPoint wxGetMousePosition()
+{
+ POINTL vPt;
+
+ ::WinQueryPointerPos(HWND_DESKTOP, &vPt);
+ return wxPoint(vPt.x, vPt.y);
+}