The task is to zoom-in the bitmap in the Virtual frame buffer. The code that I have so far is this:
( function MakeParam LoWord HiWord = ( bit.or (bit.shift HiWord 16) (bit.and LoWord 0xFFFF) ) function MouseButtonClick pos viewHWND = ( WM_MOUSEHWHEEL = 0x020A pp = makeParam (pos.x as integer) (pos.y as integer) windows.postmessage viewHWND WM_MOUSEHWHEEL 0 pp -- windows.postmessage viewHWND WM_MOUSEHWHEEL -1 pp ) function GetVFBbuttons = ( childArr = UIAccessor.getChildWindows 0 maxVFB = undefined stopLoop = false for chld in childArr while stopLoop == false do ( dialogTitle = UIAccessor.getWindowText chld if (matchpattern dialogTitle pattern:"*, frame * (*:*)") do ( maxVFB = chld stopLoop = true ) ) maxVFB ) maxVFB = GetVFBbuttons() screenPos = [500,500] mouseButtonClick screenPos maxVFB )
To test it just render some objects and while the VFB is visible execute the code.
It simulates mouse wheel rotation over the VFB window. On each rotation the zoom level is changed(level up or level down).
The problem is that this code actually performs zoom-out. When I use the same code(slightly modified) for the active viewport this
windows.postmessage viewHWND WM_MOUSEHWHEEL 0 pp
windows.postmessage viewHWND WM_MOUSEHWHEEL -1 pp
But for the VFB both parameters(0 and -1) performs zoom-out.
Is there are any solution?