>>197
EnumWindowで出来ます? SetTimerはタイムラグがありそうだし、
TIMERPROC型がWNDPROCと同じ個数の引数なので意味なさそうです。

> つーか、なんでパラメータを無視するんだよぅ(笑
だって、この場合必要ないし。


たいした問題じゃないんですが、名前を変更してみました。
これで一見、「どうやってるんだ?」って思わせられるはず(w
Option Explicit

Public Declare Function CallFunc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal Param1 As Long, ByVal Param2 As Long, ByVal Param3 As Long, ByVal Param4 As Long) As Long

Sub main()
Dim adr As Long
adr = FuncPtr(AddressOf func)

Debug.Print "ret:" & CallFunc(adr, 0, 0, 0, 0)
End Sub

Public Function FuncPtr(ByVal Address As Long) As Long
FuncPtr = Address
End Function

Public Function func(ByVal Param1 As Long, ByVal Param2 As Long, ByVal Param3 As Long, ByVal Param4 As Long) As Long
Debug.Print "func"
func = 1
End Function