[Win32utils-devel] win32-clipboard and change_notify
djberg96 at gmail.com
Thu Jan 9 16:41:05 UTC 2014
On Thu, Jan 9, 2014 at 8:10 AM, Heesob Park <phasis at gmail.com> wrote:
> 2014/1/9 Daniel Berger <djberg96 at gmail.com>:
> > Hi,
> > I'm having a bit of trouble with converting one bit of the change_notify
> > code. The first time SetWindowLongPtr is called, it's passed a proc
> > (callback). The second time, it's passed an HWND, returned from
> > SetClipboardViewer.
> > I'm not sure how to handle the function declaration or how to pass
> > exactly. Is there a way to convert a Ruby proc directly into an FFI
> I'm not sure what is your problem.
> WNDPROC type is LRESULT (CALLBACK* WNDPROC) (HWND, UINT, WPARAM, LPARAM);
> wnd_proc could be translated as FFI::Function
> wnd_proc = FFI::Function.new(:void, [:pointer, :long, :long, :long,
> :long]) do |hwnd, umsg, wparam, lparam|
> SetWindowLongPtr(handle, GWL_WNDPROC, wnd_proc.address)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the win32utils-devel