Greetings,
I didn't really get an answer on these 2 APIs:
DECLARE FUNCTION SetClipboardViewer LIB "USER32" _
(hWndNewViewerVm AS LONG) AS LONG
DECLARE FUNCTION ChangeClipboardChain LIB "USER32" _
(hWndNewViewerVm AS LONG, hWndNextViewerVm AS LONG) AS LONG
I notice they aren't available in iwb users guide.
How would I code these in iwb ?
Thanks...Vernon
They are declared in the same format as other API functions
DECLARE IMPORT, SetClipboardViewer(hwnd:INT),INT
DECLARE IMPORT, ChangeClipboardChain(hwnd:INT, hWndNext:INT),INT
when you see hwnd in a declare statement it is referring to Windows handle to an IWB window.
WINDOW MyWin
OPENWINDOW MyWin......
...
...
SetClipboardViewer(MyWin.hwnd)
ChangeClipboardChain(MyWin.hwnd, hWndNext)
I couldn't find an actual IWB example that uses those functions.
Thanks Larry,
This part I understand:
DECLARE IMPORT, SetClipboardViewer(hwnd:INT),INT
DECLARE IMPORT, ChangeClipboardChain(hwnd:INT, hWndNext:INT),INT
hwndNextViewer = SetClipboardViewer(hwndMyViewer)
I am confused with:
SetClipboardViewer(MyWin.hwnd)
Shouldn't it return a value ?
and same with:
ChangeChainReturn = ChangeClipboardChain(hwndMyViewer, hwndNextViewer)
I am confused with:
ChangeClipboardChain(MyWin.hwnd, hWndNext)
Shouldn't it return a value ?
Or is this your shorthand, where a return is understood?
Also, is INT in iwb actually LONG ?
Thanks...Vernon
QuoteOr is this your shorthand, where a return is understood?
Also, is INT in iwb actually LONG ?
yes and yes
SetClipboardViewer(MyWin.hwnd)
ChangeClipboardChain(MyWin.hwnd, hWndNext)should be more like this:
int h1,h2
h1 = SetClipboardViewer(MyWin.hwnd)
h2= ChangeClipboardChain(MyWin.hwnd, hWndNext)
Ah yes, I see.
Thank you very much...Vernon