国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

在MapX中響應滾輪放大縮小地圖

2024-07-21 02:25:23
字體:
來源:轉載
供稿:網友

’模塊中

option explicit

public const gwl_wndproc = (-4)
public const wm_command = &h111
public const wm_mbuttondown = &h207
public const wm_mbuttonup = &h208
public const wm_mousewheel = &h20a

public oldwinproc   as long
public declare function setwindowlong lib "user32" alias "setwindowlonga" (byval hwnd as long, byval nindex as long, byval dwnewlong as long) as long
public declare function callwindowproc lib "user32" alias "callwindowproca" (byval lpprevwndfunc as long, byval hwnd as long, byval msg as long, byval wparam as long, byval lparam as long) as long
public declare function getwindowlong lib "user32" alias "getwindowlonga" (byval hwnd as long, byval nindex as long) as long

public function flexscroll(byval hwnd as long, byval wmsg as long, byval wparam as long, byval lparam as long) as long
    select case wmsg
        case wm_mousewheel
            select case wparam
                case -7864320     '向下滾
                    setcurrentscale "zoomout", 2
                case 7864320       '向上滾
                    setcurrentscale "zoomin", 2
          end select
    end select
   
    flexscroll = callwindowproc(oldwinproc, hwnd, wmsg, wparam, lparam)
end function



private sub setcurrentscale(strinorout as string, dscale as double)
    if frmmain.map1 is nothing then exit sub
   
    if strinorout = "zoomin" then
        frmmain.map1.zoom = (frmmain.map1.zoom) * dscale
        frmmain.map1.refresh
    elseif strinorout = "zoomout" then
        frmmain.map1.zoom = (frmmain.map1.zoom) / dscale
        frmmain.map1.refresh
    end if
end sub







private sub form_load()
        
    oldwinproc = getwindowlong(map1.hwnd, gwl_wndproc)
    setwindowlong map1.hwnd, gwl_wndproc, addressof flexscroll

end sub

private sub form_unload(cancel as integer)
    setwindowlong map1.hwnd, gwl_wndproc, oldwinproc
end sub


商業源碼熱門下載www.html.org.cn

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 南和县| 梧州市| 唐河县| 方城县| 平塘县| 武川县| 富裕县| 仙游县| 滕州市| 和田市| 宁河县| 沙河市| 毕节市| 当涂县| 荆州市| 平原县| 永善县| 富锦市| 淄博市| 华池县| 静乐县| 六安市| 绥芬河市| 湘阴县| 都匀市| 安岳县| 正安县| 鹤庆县| 柯坪县| 郁南县| 闻喜县| 桑日县| 上杭县| 和林格尔县| 抚宁县| 上高县| 揭东县| 阿克陶县| 邳州市| 扎赉特旗| 门源|