Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 03 AUG 2006 01:00:01PM Bob Carten wrote:

Viewing the ShellExecute Thread reminded me of a to date undocumented feature of OpenInsight, namely the ability to create native callbacks. An example appears below. Help Docs will be updated. pre.code { background-color: #E5E5E5; border: 1px solid #000000; width: 600px; padding: 5px; font-family: courier, verdana, arial, serif; margin: 0px 10px auto; } <code> function callback_test(hwnd, lParam) * ** Demo of Native Callbacks from OI * 03-14-04 PJM Created * 08-03-06 RJC Add self-prototype declare function CreateCallBack, EnumWindows * Check if this is a callback invocation. if assigned(hwnd) and len(hwnd) ] 0 then * It is, accumulate all hwnds in our Basic+ variable lParam=hwnd return 1 end * Initalizing Invocation * Ensure Windows API call is supported * EnumWindows is declared as: INT STDCALL EnumWindows(CALLBACK, VARIABLE) * lib=USER32' proto_id=DLL_':lib proto_rec=Xlate('SYSPROCS', proto_id, '', 'X') if proto_Rec=' then proto_rec=lib end exists=indexc(proto_rec, ' EnumWindows', 1) If exists else proto_rec=INT STDCALL EnumWindows(CALLBACK, VARIABLE)" call write_Row('SYSPROCS', proto_id, proto_rec, 1) call declare_fcns(proto_id) end * Create the call back handle. We will recursively * call back to ourselves in this test. CallBack=CreateCallBack("INT STDCALL CALLBACK_TEST(HANDLE, VARIABLE)") if not(num(CallBack)) then debug ;* error!!! end Windows=' a=EnumWindows(CallBack, Windows) * Windows now contains all desktop window handles. return Windows </code> </QUOTE> ---- === At 03 AUG 2006 01:19PM [url=http://www.sprezzatura.com]The Sprezzatura Grou wrote: ===

A useful technique indeed! We've used this to great effect at Sprezz Towers to enumerate monitors in a multiple monitor environment so we can more effectively work out to to lay out our more sophisticated OI apps.

The Sprezzatura Group

World leaders in all things RevSoft


=== At 03 AUG 2006 01:58PM Mike Ruane wrote: ===

Sprezz Towers?


=== At 03 AUG 2006 02:54PM The Sprezzatura Group wrote: ===

www.sprezzatura.com_images_sprezz.jpg

:)

The Sprezzatura Group

World leaders in all things RevSoft


=== At 04 AUG 2006 07:29PM Bob Carten wrote: ===

suite!

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/a589fb6f69e2899f852571bf005d62a9.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1