Date: 02-16-2022
Return to Index
created by gbSnippets
'------------------------------------------------------------------------
9:
ChildWindowFromPoint pt.x, pt.y
(ByVal hwndParent As Dword, ByVal ptX As Long, ByVal ptY As Long)
10:
ChildWindowFromPoint pt
'------------------------------------------------------------------------
9:
WindowFromPoint pt.x, pt.y
10:
WindowFromPoint pt
'------------------------------------------------------------------------
9:
PtInRect(pt.x,pt.y)
10:
PtInRect(pt)
'------------------------------------------------------------------------
9:10:
ScreenToClient - no changes
'------------------------------------------------------------------------
9:
Declare Function MapWindowPoints Lib "USER32.DLL" Alias "MapWindowPoints" _
(ByVal hWndFrom As Dword, ByVal hWndTo As Dword, lppt As Any, ByVal cPoints As Long) As Long
MapWindowPoints ( ... pt, iCount)
10:
Declare Function MapWindowPoints Lib "User32.dll" Alias "MapWindowPoints" _
(ByVal hWndFrom As Dword, ByVal hWndTo As Dword, ByVal lppt As Point Ptr, ByVal cPoints As Dword) As Long
MapWindowPoints ( ... VarPtr(pt), ByVal iCount)
'------------------------------------------------------------------------
10:
These two includes conflict (i.e., %EM_ScrollCaret
RichEdit.inc
CommCtrl.inc
#Compile Exe
#Dim All
#Include "win32api.inc"
#Include "RichEdit.inc"
#Include "CommCtrl.inc" '<--- this include file in turn includes winuser.inc
Function PBMain() As Long
End Function
'------------------------------------------------------------------------
Names Already In Use:
SelectFont
Pattern
DriveType
dw
dh
DD
FindText
SelectText
ReplaceText
tcItem
Is_IntResource
'------------------------------------------------------------------------
#Include "win32api.inc" '<----- add this to avoid conflict between richedit.inc and commctrl.inc
#Include "Richedit.inc"
#Include "CommCtrl.inc"
'------------------------------------------------------------------------
'To compile with PBWin9, replace CALL with USING in Array Sort (2 places in code below)
'------------------------------------------------------------------------
THREAD FUNCTIONS must now be declared as "THREAD FUNCTION"
'--------------------------------------------------------------------------
DECLARE FUNCTION MoveToEx LIB "GDI32.DLL" ALIAS "MoveToEx" _
(BYVAL hdc AS DWORD, BYVAL x AS LONG, BYVAL y AS LONG, lpPoint AS POINTAPI) AS LONG
MACRO MoveTo (hDC, x, y) = MoveToEx(hDC, x, y, BYVAL %NULL)
DECLARE FUNCTION MoveToEx LIB "GDI32.DLL" ALIAS "MoveToEx" _
(BYVAL hdc AS DWORD, BYVAL x AS LONG, BYVAL y AS LONG, lpPoint AS POINT) AS LONG
MACRO MoveTo(hDC,x,y)=MoveToEx(hDC,x,y,BYVAL %NULL)
'------------------------------------------------------------------------
'------------------------------------------------------------------------
'gbs_00742
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm